Dominique wrote:
> Nazri Ramliy <[email protected]> wrote: > > > On Fri, Jul 6, 2018 at 8:59 PM, Dominique Pell=C3=A9 > > <[email protected]> wrote: > > >> Can you try interactively if happens when > > >> typing the Ex command :e ~a<C-a> > > >> where <C-a> is a single key for CTRL-A > > >> > > >> On which OS do you see the issue? > > >> Is it reproducible with other user names? > > > > > > I made an experiment on my machine: > > > :e ~p<c-a> > > > gives: :e ~pel proxy pulse (good!) > > > > > > Then I created a new user "pel2" and did: > > > : e ~p<c-a> gives :e ~pel pel2 proxy pulse (good) > > > : e ~pe<c-a> gives :e ~pel pel2 (good) > > > : e ~pel<c-a> gives :e /home/pel/ (does not look right!) > > > > > > I expected to get :e ~pel pel2 in the last case. > > > > > > In your case, I suspect that you have a user name called "a" > > > which is triggering the bug. > > > > > > It looks like a bug in vim found by the test. > > > > Yup I do have a user called "a" on the machine. This is on linux > > (ubuntu 16.04.4). > > > > The bug don't appear if I comment out the entry for the user "a" in /etc/= > passwd. > > > > Also I see this weird behavior: > > > > $ sudo vi /etc/passwd > > :e ~a<c-a> gives /home/a/ (buggy as expected) > > > > now without closing the file comment out the entry for the "a" user > > and save the file and reattempt the completion > > > > :e ~a<c-a> nothing suggested, ":e ~a" remains. I expect it list the > > usernames that starts with "a". > > > > Now undo the changes to the file and quit vim and open it again in vim > > but this time immediately comment out the entry for "a": > > > > $ sudo vi /etc/passwd > > comment out the entry for "a" > > > > :e ~a<c-a> gives the expected result :e ~avahi avahi-autoipd ayie > > > > nazri > > Hi Nazri > > The attached patch "fix-user-name-compl-8.1.155.patch" > should fix the bug. Can you try it? Thanks. We can simplify it by using ">= 1". I verified with "~sys", since "sys" and "syslog" are user names. > It's good to see that recently added tests discover bugs. Definitely! -- Some of the well known MS-Windows errors: EMEMORY Memory error caused by..., eh... ELICENSE Your license has expired, give us more money! EMOUSE Mouse moved, reinstall Windows EILLEGAL Illegal error, you are not allowed to see this EVIRUS Undetectable virus found /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- 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/d/optout.
