Hi Bram,
2013/3/20(Wed) 0:49:37 UTC+9 Bram Moolenaar:
> Patch 7.3.872
>
> Problem: On some systems case of file names is always ignored, on others
>
> never.
>
> Solution: Add the 'fileignorecase' option to control this at runtime.
>
> Implies 'wildignorecase'.
>
> Files: src/buffer.c, src/edit.c, src/ex_cmds2.c, src/ex_getln.c,
>
> src/fileio.c, src/misc1.c, src/misc2.c, src/option.c,
>
> src/option.h, src/vim.h, runtime/doc/options.txt
When 'set fic' on linux, file name completion order is strange.
It's different for both case-sensitive and case-insensitive.
How to reproduce (on fedora17)
$ mkdir test_fic
$ cd !$
$ touch I1.txt I2.txt J3.txt J4.txt i1.txt j3.txt
(Necessary: same file name (without case-sensitive) exist.)
$ vim -N -u NONE -i NONE --noplugin -c "set fic"
input i<C-X><C-F>
Actual result
(popup menu list items)
I1.txt
I2.txt
j3.txt
J3.txt
J4.txt
i1.txt
Expect result (like this)
I1.txt
i1.txt
I2.txt
j3.txt
J3.txt
J4.txt
Patch attached. (Thanks for advice from Yukihiro Nakadaira)
Please check.
Best Regards,
Hirohito Higashi
--
--
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
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
diff -r d2571e334983 src/misc2.c
--- a/src/misc2.c Tue Mar 19 18:31:49 2013 +0100
+++ b/src/misc2.c Wed Mar 20 21:12:40 2013 +0900
@@ -6131,7 +6131,9 @@
return -1;
if (vim_ispathsep(q[i]))
return 1;
- return ((char_u *)p)[i] - ((char_u *)q)[i]; /* no match */
+ return p_fic ? TOUPPER_LOC(((char_u *)p)[i])
+ - TOUPPER_LOC(((char_u *)q)[i])
+ : ((char_u *)p)[i] - ((char_u *)q)[i]; /* no match */
}
}
if (s == NULL) /* "i" ran into "maxlen" */