Hi
Attached patch fixes the following item in Vim's TODO list:
":e dir<Tab>" with 'wildmode' set to "list" doesn't highlight directory names
with a space. (Alexandre Provencio, 2009 Jun 9)
Steps to reproduce it:
In shell, run:
$ mkdir foo\ bar
$ mkdir foobar
$ vim -u NONE -c 'set nocompatible wildmenu wildmode=list'
In Vim, type:
:e foo<Tab>
Notice that pressing tab key shows...
foo\ bar/ foobar/
... where "foobar/" is correctly highlighted as a directory but "foo\ bar/"
is not highlighted as a directory. Both should be highlighted as directories.
I also notice that completing with <Tab> or with <C-d> gives a
different result:
:e foo<TAB> shows:
foo\ bar/ foobar/
:e foo<CTRL-D> shows:
foo bar/ foobar/
Is the difference expected? If not, what is expected?
Attached patch only fixes highlighting of directories as described in
todo.txt but does not change the difference between <TAB> and
<CTRL-D> since I don't know what is expected there.
Cheers
-- Dominique
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
diff -r aab202d244b6 runtime/doc/todo.txt
--- a/runtime/doc/todo.txt Wed Mar 10 17:16:12 2010 +0100
+++ b/runtime/doc/todo.txt Sat Mar 13 19:38:42 2010 +0100
@@ -106,7 +106,7 @@
not a string. (Sean Ma) Need to add flag to call_func_retlist() to force a
string value.
-Reproducable crash in syntax HL. (George Reilly, Dominique Pelle, 2009 May 9)
+Reproducible crash in syntax HL. (George Reilly, Dominique Pelle, 2009 May 9)
Invalid read error in Farsi mode. (Dominique Pelle, 2009 Aug 2)
@@ -143,9 +143,6 @@
Setting 'tags' to "tagsdir/*" does not find "tagsdir/tags". (Steven K. Wong,
2009 Jul 18)
-":e dir<Tab>" with 'wildmode' set to "list" doesn't highlight directory names
-with a space. (Alexandre Provencio, 2009 Jun 9)
-
Patch to add farsi handling to arabic.c (Ali Gholami Rudi, 2009 May 2)
Added test, updates, June 23.
diff -r aab202d244b6 src/ex_getln.c
--- a/src/ex_getln.c Wed Mar 10 17:16:12 2010 +0100
+++ b/src/ex_getln.c Sat Mar 13 19:38:42 2010 +0100
@@ -3838,6 +3838,7 @@
#define L_SHOWFILE(m) (showtail ? sm_gettail(files_found[m]) : files_found[m])
int num_files;
char_u **files_found;
+ char_u *halved_slash;
int i, j, k;
int maxlen;
int lines;
@@ -3948,8 +3949,10 @@
|| xp->xp_context == EXPAND_SHELLCMD
|| xp->xp_context == EXPAND_BUFFERS)
{
- /* highlight directories */
- j = (mch_isdir(files_found[k]));
+ /* highlight directories */
+ halved_slash = backslash_halve_save(files_found[k]);
+ j = mch_isdir(halved_slash);
+ vim_free(halved_slash);
if (showtail)
p = L_SHOWFILE(k);
else