forked from aniani/vim
patch 9.0.1800: Cursor position still wrong with 'showbreak' and virtual text
Problem: Cursor position still wrong with 'showbreak' and virtual text
after last character or 'listchars' "eol".
Solution: Remove unnecessary w_wcol adjustment in curs_columns(). Also
fix first char of virtual text not shown at the start of a screen
line.
closes: #12478
closes: #12532
closes: #12904
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This commit is contained in:
committed by
Christian Brabandt
parent
9a6cf34a1e
commit
6a3897232a
11
src/move.c
11
src/move.c
@@ -1205,17 +1205,6 @@ curs_columns(
|
||||
n = (curwin->w_wcol - curwin->w_width) / width2 + 1;
|
||||
curwin->w_wcol -= n * width2;
|
||||
curwin->w_wrow += n;
|
||||
|
||||
#ifdef FEAT_LINEBREAK
|
||||
// When cursor wraps to first char of next line in Insert
|
||||
// mode, the 'showbreak' string isn't shown, backup to first
|
||||
// column
|
||||
char_u *sbr = get_showbreak_value(curwin);
|
||||
if (*sbr && *ml_get_cursor() == NUL
|
||||
&& curwin->w_wcol
|
||||
== (curwin->w_width - width2) + vim_strsize(sbr))
|
||||
curwin->w_wcol = 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user