Yasuhiro Matsumoto wrote: > When set autocmd InsertCharPre like following, It should work with all > key typings to insert 'f' at all. > > autocmd InsertCharPre * let v:char = 'f' > > But often, it show other characters (not 'f') in the screen. > This causes by two problems. > > 1. Typing keys while popup menu is shown are not handled in normally. > When popup menu is shown, key types are handled to decide of candidate. > And it behave independently. > > 2. Keys are grabbed at once for speed up. > See the comment arround edit.c:5864. > > /* > * If there's any pending input, grab up to INPUT_BUFLEN at once. > * This speeds up normal text input considerably. > * Don't do this when 'cindent' or 'indentexpr' is set, because we might > * need to re-indent at a ':', or any other character (but not what > * 'paste' is set).. > * Don't do this when there is InsertCharPre autocommand defined, > * because we need to fire the event for every character. > */ > > So, some key types don't fire InsertCharPre. > It should be disabled while InsertCharPre is working. > > Below is a patch. Please check and include.
Thanks. I'll put it in the todo list. I'm not sure if InsertCharPre should apply when the popup menu is visible, keys mean something else then. Perhaps we would need another event for that sitiuation? -- >From "know your smileys": :-D Big smile /// 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
