mirror of
https://github.com/neovim/neovim.git
synced 2024-12-31 17:13:26 -07:00
Merge pull request #9629 from bfredl/pumfix
screen: don't crash when drawing popupmenu with 'rightleft' option
This commit is contained in:
commit
46c7e12f27
@ -5338,10 +5338,11 @@ void screen_puts_len(char_u *text, int textlen, int row, int col, int attr)
|
||||
schar_from_ascii(ScreenLines[off - 1], ' ');
|
||||
ScreenAttrs[off - 1] = 0;
|
||||
// redraw the previous cell, make it empty
|
||||
if (put_dirty_first == -1) {
|
||||
if (put_dirty_first == -1 || col-1 < put_dirty_first) {
|
||||
put_dirty_first = col-1;
|
||||
}
|
||||
put_dirty_last = col+1;
|
||||
put_dirty_last = MAX(put_dirty_last, col+1);
|
||||
// force the cell at "col" to be redrawn
|
||||
force_redraw_next = true;
|
||||
}
|
||||
@ -5422,10 +5423,10 @@ void screen_puts_len(char_u *text, int textlen, int row, int col, int attr)
|
||||
ScreenLines[off + 1][0] = 0;
|
||||
ScreenAttrs[off + 1] = attr;
|
||||
}
|
||||
if (put_dirty_first == -1) {
|
||||
if (put_dirty_first == -1 || col < put_dirty_first) {
|
||||
put_dirty_first = col;
|
||||
}
|
||||
put_dirty_last = col+mbyte_cells;
|
||||
put_dirty_last = MAX(put_dirty_last, col+mbyte_cells);
|
||||
}
|
||||
|
||||
off += mbyte_cells;
|
||||
|
Loading…
Reference in New Issue
Block a user