On Saturday, July 9, 2016 at 5:20:16 AM UTC+9, Bram Moolenaar wrote: > I wrote: > > > Patch 7.4.2003 > > Problem: Still cursor flickering when a callback updates the screen. > > (David > > Samvelyan) > > Solution: Put the cursor in the right position after updating the screen. > > Files: src/screen.c > > Looks like this fix triggers another cursor positioning problem. > When doing "rx" it first gets displayed in the right place, then drawn > two characters to the left. Not sure where that comes from yet...
As your worries, this change doesn't work with multi-byte characters correctly. When the cursor goes down bottom of screen, and the cursor overwrap with trailing-byte of multi-byte, screen break drawing. [][][]_ [] --------------- bottom line X[][][][] "_" is cursor. https://cloud.githubusercontent.com/assets/518808/19011184/a29ebeee-87c9-11e6-9d5e-032e9423b7ae.png gui.col should be fixed if the cursor is overwrapped on the trailing-byte of multibyte. diff --git a/src/screen.c b/src/screen.c index 4604ec7..5ebca09 100644 --- a/src/screen.c +++ b/src/screen.c @@ -765,6 +765,9 @@ update_screen(int type) * uses that. */ gui.col = gui_cursor_col; gui.row = gui_cursor_row; +# ifdef FEAT_MBYTE + gui.col = mb_fix_col(gui.col, gui.row); +# endif gui_update_cursor(FALSE, FALSE); screen_cur_col = gui.col; screen_cur_row = gui.row; -- -- 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.