gui_gtk patch to ensure file chooser remembers its directory

Bram Moolenaar Bram at moolenaar.net
Tue Oct 10 16:18:57 UTC 2006


James -

> Current versions of Vim using the Gtk/Gnome gui will not maintain the
> directory of the last opened file if it is in a subdirectory of Vim's
> cwd.  For example, if Vim is started in a user's $HOME and they use the
> file chooser to open $HOME/tmp/foo.c, the next invocation of the file
> chooser will default to the $HOME directory instead of $HOME/tmp.  Where
> as if they had opened a file outside of $HOME, that directory would be
> default.
> 
> This was because the initial directory being passed to the file chooser
> was relative instead of absolute as expected (and noted in
> gui_mch_browsedir).  The attached patch corrects gui_mch_browse to pass
> an absolute path to gtk_file_chooser_set_current_folder.

The patch apparently is for an older Vim version.  But the problem is
still there.  I'll merge it in.

- Bram

-- 
I am also told that there is a logical proof out there somewhere
that demonstrates that there is no task which duct tape cannot handle.
					-- Paul Brannan

 /// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///



More information about the pkg-vim-maintainers mailing list