mirror of
https://github.com/neovim/neovim.git
synced 2024-12-31 17:13:26 -07:00
fix(drawline): update prev_ptr after getting syntax attrs (#27072)
This commit is contained in:
parent
8a07ca6c4b
commit
5b31447811
@ -1923,6 +1923,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int col_rows, s
|
|||||||
// Get extmark and syntax attributes, unless still at the start of the line
|
// Get extmark and syntax attributes, unless still at the start of the line
|
||||||
// (double-wide char that doesn't fit).
|
// (double-wide char that doesn't fit).
|
||||||
v = ptr - line;
|
v = ptr - line;
|
||||||
|
const ptrdiff_t prev_v = prev_ptr - line;
|
||||||
if (has_syntax && v > 0) {
|
if (has_syntax && v > 0) {
|
||||||
// Get the syntax attribute for the character. If there
|
// Get the syntax attribute for the character. If there
|
||||||
// is an error, disable syntax highlighting.
|
// is an error, disable syntax highlighting.
|
||||||
@ -1947,6 +1948,7 @@ int win_line(win_T *wp, linenr_T lnum, int startrow, int endrow, int col_rows, s
|
|||||||
// have made it invalid.
|
// have made it invalid.
|
||||||
line = ml_get_buf(wp->w_buffer, lnum);
|
line = ml_get_buf(wp->w_buffer, lnum);
|
||||||
ptr = line + v;
|
ptr = line + v;
|
||||||
|
prev_ptr = line + prev_v;
|
||||||
|
|
||||||
// no concealing past the end of the line, it interferes
|
// no concealing past the end of the line, it interferes
|
||||||
// with line highlighting.
|
// with line highlighting.
|
||||||
|
Loading…
Reference in New Issue
Block a user