2010/8/15 Bram Moolenaar <[email protected]>: > One remaining problem: > > - go to the Vim "src" directory > - vi main.c > - :set path=./proto > - :find e<C-D> > > The first item is ./proto/eval.pro, somehow it's not shortened. > It's probably because there also is ex_eval.pro.
Yes. I encountered this bug a while ago and wrongly solved it by using gettail(), which was later "corrected" with the restoration of the "rival" variable in the "is_unique()" function. Attached patch fixes this problem. Thanks for Vim 7.3! nazri. -- 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
From f32f698261e48556f5d3a60bcca3668e8e7bb8d1 Mon Sep 17 00:00:00 2001 From: Nazri Ramliy <[email protected]> Date: Mon, 16 Aug 2010 06:57:05 +0800 Subject: [PATCH] bugfix for is_unique --- src/misc1.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/misc1.c b/src/misc1.c index fd178c9..e1da756 100644 --- a/src/misc1.c +++ b/src/misc1.c @@ -9317,7 +9317,10 @@ is_unique(maybe_unique, gap, i) continue; /* it's different when it's shorter */ rival = other_paths[j] + other_path_len - candidate_len; - if (fnamecmp(maybe_unique, rival) == 0) + + if (fnamecmp(maybe_unique, rival) == 0 + && (rival == other_paths[j] + || vim_ispathsep(*(rival - 1)))) return FALSE; /* match */ } -- 1.7.2.1.44.g721e7
