summaryrefslogtreecommitdiff
path: root/src/gui_gtk.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2007-09-30 12:02:55 +0000
committerBram Moolenaar <Bram@vim.org>2007-09-30 12:02:55 +0000
commitd089d9b33ac62ccc2783928a66c8f20499470920 (patch)
treea39eb1ed68513118c3e25482af67b556dbec02e0 /src/gui_gtk.c
parent78ab331e0d8a76f553830f0347ac27311e4dc0f8 (diff)
downloadvim-git-d089d9b33ac62ccc2783928a66c8f20499470920.tar.gz
updated for version 7.1-126v7.1.126
Diffstat (limited to 'src/gui_gtk.c')
-rw-r--r--src/gui_gtk.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/gui_gtk.c b/src/gui_gtk.c
index cfba5c764..740d4a044 100644
--- a/src/gui_gtk.c
+++ b/src/gui_gtk.c
@@ -1272,7 +1272,6 @@ gui_mch_browse(int saving,
GtkWidget *fc;
#endif
char_u dirbuf[MAXPATHL];
- char_u *p;
# ifdef HAVE_GTK2
title = CONVERT_TO_UTF8(title);
@@ -1363,11 +1362,7 @@ gui_mch_browse(int saving,
return NULL;
/* shorten the file name if possible */
- mch_dirname(dirbuf, MAXPATHL);
- p = shorten_fname(gui.browse_fname, dirbuf);
- if (p == NULL)
- p = gui.browse_fname;
- return vim_strsave(p);
+ return vim_strsave(shorten_fname1(gui.browse_fname));
}
#if defined(HAVE_GTK2) || defined(PROTO)
@@ -1427,11 +1422,7 @@ gui_mch_browsedir(
return NULL;
/* shorten the file name if possible */
- mch_dirname(dirbuf, MAXPATHL);
- p = shorten_fname(dirname, dirbuf);
- if (p == NULL || *p == NUL)
- p = dirname;
- p = vim_strsave(p);
+ p = vim_strsave(shorten_fname1(dirname));
g_free(dirname);
return p;