Mirror of the Vim source from https://github.com/vim/vim
Revisão | a1c1f001b99dd591d9082db95de70e2bf8f9e8de (tree) |
---|---|
Hora | 2006-10-11 01:28:30 |
Autor | vimboss |
Commiter | vimboss |
updated for version 7.0-129
@@ -1275,18 +1275,13 @@ | ||
1275 | 1275 | title = CONVERT_TO_UTF8(title); |
1276 | 1276 | # endif |
1277 | 1277 | |
1278 | - /* Concatenate "initdir" and "dflt". */ | |
1278 | + /* GTK has a bug, it only works with an absolute path. */ | |
1279 | 1279 | if (initdir == NULL || *initdir == NUL) |
1280 | 1280 | mch_dirname(dirbuf, MAXPATHL); |
1281 | - else if (STRLEN(initdir) + 2 < MAXPATHL) | |
1282 | - STRCPY(dirbuf, initdir); | |
1283 | - else | |
1281 | + else if (vim_FullName(initdir, dirbuf, MAXPATHL - 2, FALSE) == FAIL) | |
1284 | 1282 | dirbuf[0] = NUL; |
1285 | 1283 | /* Always need a trailing slash for a directory. */ |
1286 | 1284 | add_pathsep(dirbuf); |
1287 | - if (dflt != NULL && *dflt != NUL | |
1288 | - && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL) | |
1289 | - STRCAT(dirbuf, dflt); | |
1290 | 1285 | |
1291 | 1286 | /* If our pointer is currently hidden, then we should show it. */ |
1292 | 1287 | gui_mch_mousehide(FALSE); |
@@ -1341,6 +1336,11 @@ | ||
1341 | 1336 | else |
1342 | 1337 | gtk_window_set_title(GTK_WINDOW(gui.filedlg), (const gchar *)title); |
1343 | 1338 | |
1339 | + /* Concatenate "initdir" and "dflt". */ | |
1340 | + if (dflt != NULL && *dflt != NUL | |
1341 | + && STRLEN(dirbuf) + 2 + STRLEN(dflt) < MAXPATHL) | |
1342 | + STRCAT(dirbuf, dflt); | |
1343 | + | |
1344 | 1344 | gtk_file_selection_set_filename(GTK_FILE_SELECTION(gui.filedlg), |
1345 | 1345 | (const gchar *)dirbuf); |
1346 | 1346 | # ifndef HAVE_GTK2 |
@@ -667,6 +667,8 @@ | ||
667 | 667 | static int included_patches[] = |
668 | 668 | { /* Add new patch number below this line */ |
669 | 669 | /**/ |
670 | + 129, | |
671 | +/**/ | |
670 | 672 | 128, |
671 | 673 | /**/ |
672 | 674 | 127, |