forked from aniani/vim
patch 8.0.0394: tabs are not aligned when scrolling horizontally
Problem: Tabs are not aligned when scrolling horizontally and a Tab doesn't fit. (Axel Bender) Solution: Handle a Tab as a not fitting character. (Christian Brabandt) Also fix that ":redraw" does not scroll horizontally to show the cursor. And fix the test that depended on the old behavior.
This commit is contained in:
@@ -3429,10 +3429,13 @@ win_line(
|
||||
#else
|
||||
--ptr;
|
||||
#endif
|
||||
/* If the character fits on the screen, don't need to skip it.
|
||||
* Except for a TAB. */
|
||||
if ((
|
||||
#ifdef FEAT_MBYTE
|
||||
/* character fits on the screen, don't need to skip it */
|
||||
if ((*mb_ptr2cells)(ptr) >= c && col == 0)
|
||||
(*mb_ptr2cells)(ptr) >= c ||
|
||||
#endif
|
||||
*ptr == TAB) && col == 0)
|
||||
n_skip = v - vcol;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user