diff options
author | ZviRackover <zvirack@gmail.com> | 2018-07-05 22:27:18 +0300 |
---|---|---|
committer | ZviRackover <zvirack@gmail.com> | 2018-08-13 18:07:40 +0300 |
commit | 7676fc7562c7edd116da9dad472be44458ba6fbc (patch) | |
tree | e33d65ca519fee99214ec3f6ac8ca67cfae3a9bb | |
parent | 7046258a384c400e0aab0691cddd10425f92ccf1 (diff) | |
download | rneovim-7676fc7562c7edd116da9dad472be44458ba6fbc.tar.gz rneovim-7676fc7562c7edd116da9dad472be44458ba6fbc.tar.bz2 rneovim-7676fc7562c7edd116da9dad472be44458ba6fbc.zip |
Remove occurrences of 'has_mbyte' near lines changes by parent commit
-rw-r--r-- | src/nvim/screen.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 6728328e55..3179a73ffd 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -4242,14 +4242,13 @@ win_line ( * Don't do this for double-width characters. * Don't do this for a window not at the right screen border. */ - if (!(has_mbyte - && (utf_off2cells(LineOffset[screen_row], - LineOffset[screen_row] + screen_Columns) + if (!(utf_off2cells(LineOffset[screen_row], + LineOffset[screen_row] + screen_Columns) == 2 || utf_off2cells(LineOffset[screen_row - 1] + (int)Columns - 2, LineOffset[screen_row] + screen_Columns) - == 2)) + == 2) ) { ui_add_linewrap(screen_row-1); } @@ -4383,7 +4382,7 @@ static void screen_line(int row, int coloff, int endcol, redraw_next = char_needs_redraw(off_from, off_to, endcol - col); while (col < endcol) { - if (has_mbyte && (col + 1 < endcol)) + if (col + 1 < endcol) char_cells = utf_off2cells(off_from, max_off_from); else char_cells = 1; @@ -4403,7 +4402,7 @@ static void screen_line(int row, int coloff, int endcol, // the right halve of the old character. // Also required when writing the right halve of a double-width // char over the left halve of an existing one - if (has_mbyte && col + char_cells == endcol + if (col + char_cells == endcol && ((char_cells == 1 && utf_off2cells(off_to, max_off_to) > 1) || (char_cells == 2 |