Eric Van wrote: > It appears that code completion is removing any entries that have > duplicate 'word' attributes. > > For completion results not using the dictionary format I fully agree > that duplicates can safely be removed, but when using the dictionary > format two or more entries sharing the same 'word' attribute should > not be considered duplicates. > > For instance, performing code completion on the following java code > String name = ... > name.to<C-X><C-U> > > My code completion function returns a list with the following entries: > kind: 'f', word: 'toCharArray', menu: 'toCharArray() char[] - String' > kind: 'f', word: 'toString', menu: 'toString() String - String' > kind: 'f', word: 'toUpperCase', menu: 'toUpperCase() String - String' > kind: 'f', word: 'toUpperCase', menu: 'toUpperCase(Locale locale) > String - String' > kind: 'f', word: 'toLowerCase', menu: 'toLowerCase() String - String' > kind: 'f', word: 'toLowerCase', menu: 'toLowerCase(Locale locale) > String - String' > > But vim removes the 4th and 5th entry since they have the same 'word' > value as the entry before them (at least I assume that is why they are > removed). As a user I then never get to see that String has a > toUpperCase and toLowerCase that take a Locale as an argument. > > So I suggest either removing duplicate checking when results are in > the dictionary format, or at the very least, check the 'menu' > attribute along with the 'word' attribute to determine if an entry is > a duplicate, however that may or may not work for everyone. > > Thoughts? Comments?
Since we are talking about completion, there is only one word to be completed "toLowerCase". That it can have different arguments doesn't matter for inserting "toLowerCase". You could have a function name ten times and need to type CTRL-N ten times to get to another word. I suggest you put alternate function arguments together with one word. Thus "toLowerCase" would have a menu item and info that shows both possible forms of arguments. -- hundred-and-one symptoms of being an internet addict: 229. You spend so much time thinking what to add on this list. /// Bram Moolenaar -- [EMAIL PROTECTED] -- 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://www.ICCF.nl ///