On Wednesday, July 16, 2014 9:18:53 AM UTC-7, Bram Moolenaar wrote: > Jacob Niehus wrote: > > > > > I agree with all of that in principle, but I've been able to reliably > > > compile and with and without the screen_start() and see the problem go > > > away with screen_start() there. Unfortunately I don't know why it > > > works, so I can't really defend my suggestion. > > > > > > Forcing a redraw with update_screen(CLEAR) does work, but anything > > > below that (NOT_VALID etc.) didn't work. It's not the best solution, > > > but I can't find the cause of the problem after lots of digging > > > through the code. > > > > Hmm, if CLEAR is necessary this indicates an external program is messing > > up the screen. Or there is a weird bug in Vim. For normal redrawing > > NOT_VALID should be sufficient. > > > > -- > > Why is "abbreviation" such a long word? > > > > /// Bram Moolenaar -- b...@moolenaar.net -- 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 ///
Bram, I made a big discovery on this today. I can reproduce the problem very reliably now. The issue occurs rarely when the system() command is called in insert mode, e.g. in an InsertCharPre autocommand. I can reproduce the problem by intentionally calling system() a bunch of times while typing in insert mode. If you run Vim with "-u NONE -i NONE -S sys_ins.vim" and then type in insert mode at a moderate pace (typing a single letter at a time doesn't seem to ever cause the problem), the same letter will be inserted multiple times for a single keypress and the displayed characters persist after exiting insert mode until a complete redraw. The cursor can't be moved onto the anomalous characters. Let me know if you can reproduce the problem this way. I looked into the code for inserting characters a bit, and the insert_char()/insert_char_bytes() are only being called once per keypress, so I don't know how to proceed with tracking down the problem. Thanks, Jake " sys_ins.vim: set nocp function! DoSystem() for n in range(1,20) call system('ls') endfor endfunction autocmd InsertCharPre * call DoSystem() -- -- 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 vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
sys_ins.vim
Description: Binary data