Hirohito Higashi wrote:
> 2015/2/9(Mon) 2:21:55 UTC+9 h_east:
> > Hi Bram and Nice Vim developers,
> >
> > 2015/1/6(Tue) 4:58:27 UTC+9 Bram Moolenaar:
> > > Yasuhiro Matsumoto wrote:
> > >
> > > > bug.vim
> > > > -------------------
> > > > set nocompatible
> > > >
> > > > inoremap <F5> <C-R>=ListMonths()<CR>
> > > >
> > > > func! ListMonths()
> > > > call complete(col('.'), ['January', 'February', 'March',
> > > > \ 'April', 'May', 'June', 'July', 'August', 'September',
> > > > \ 'October', 'November', 'December'])
> > > > return ''
> > > > endfunc
> > > > -------------------
> > > >
> > > > 1. vim -u bug.vim -N
> > > >
> > > > 2. press F5
> > > >
> > > > 3. type Ctrl-L while popup menu is visible
> > > >
> > > > Ctrl-L should not behave like Ctrl-P. ins_compl_key2dir() handles
> > > > suffix keys after CTRL-X. And also it handles keys while popup menu is
> > > > visible (ex: CTRL-P/CTRL-N). This should be cleanly separated.
> > > >
> > > > https://gist.github.com/mattn/2c83d5a17c9e9505e43d
> > >
> > > Thanks!
> >
> > I update a patch. (Attached to this email)
> > Please check.
>
> Oops. My previous patch had a problem. so I attached a new patch.
> Please check.
Thanks for the update.
> > And ...
> > I found specification inconsistency between 'complete()' and 'backspace'
> > option.
> >
> > How to reproduce:
> > 1. cat test.vim
> > inoremap <F5> <C-R>=ListMonths()<CR>
> >
> > func! ListMonths()
> > call complete(1, ['One', 'Three'])
> > return ''
> > endfunc
> >
> > 2. vim -N -u test.vim
> >
> > 3. Enter insert-mode and input 'ab' and leave insert-mode.
> > iab<Esc>
> >
> > 4. Reenter insert-mode and use 'complete()'
> > a<F5>
> >
> > 5. Delete two characters.
> > <C-H><C-H>
> >
> > What happen.
> > - '4.' Edit start columns 3, but 'complete()' starts 1 (by 1st argument).
> > - '5.' Can't delete column 1 and 2
> > 'backspace' option not contain "start", So vim can not deleted this.
> >
> > I think this is specification inconsistency.
> > How Let's fix?
> > (a) Occurred an error when 'complete()' first argument is can not be
> > deleted by under the influence of the 'backspace' option.
> >
> > (b) Adjust the first argument value implicitly in f_complete(). (In this
> > case, Ajust 3)
> >
> > (c) Between 'complete()' is functioning to ignore the 'backspace' option.
> >
> > I would write the patch when you are determined.
>
> Bram, Please decide a specification.
The 'backspace' option should probably be ignored in this situation,
since the code says to change those characters. 'backspace' is really
to make Vim backwards compatible with Vi, for those users who prefer it
that way. I don't think it should apply to Insert mode completion.
--
hundred-and-one symptoms of being an internet addict:
243. You unsuccessfully try to download a pizza from www.dominos.com.
/// 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.