Bram Moolenaar wrote:
Georg Dahn wrote:
Ok, let's assume there are several completions, such that you get a menu
with <C-N>. Then if you move the selection with the cursor keys and
press <Enter>, the selected item is being chosen. If you do the same
with <C-N> (instead of using cursor keys), <Enter> inserts a new line. I
think, this is confusing.
Is this behavior intentional or is it a bug?
This is intentional, it was discussed recently.
This is a compromise between different expectations from different
users. People who used CTRL-N/CTRL-P in Vim 6.4 expect the <Enter> to
be inserted, since that is what happened in older versions. People who
are using cursor keys to select an item in the popup menu mostly expect
<Enter> to accept the selected match. That's why the behavior of
<Enter> depends on what you did earlier.
Hi,
I also think here is a little confusing. Since the user are
selecting menu items with <C-N>/<C-P>, and at this time, Enter is
normally assumed as a confirm of the selection. And I think it is very
common a user interface convention.
I think it is worth breaking the compatibility between vim6.x and
vim7 since there is no completion menu in vim6.x.
Best regards,
Vincent