fix(bufupdates): send correct updates for visual paste

One step further towards stable tree-sitter.

Co-authored-by: Björn Linse <bjorn.linse@gmail.com>
This commit is contained in:
Thomas Vigouroux
2021-08-24 17:57:57 +02:00
parent 5d633546bf
commit 14231463a4
2 changed files with 19 additions and 2 deletions

View File

@@ -3444,8 +3444,9 @@ void do_put(int regname, yankreg_T *reg, int dir, long count, int flags)
(int)y_size-1, lastsize, totsize,
kExtmarkUndo);
} else if (y_type == kMTLineWise && flags & PUT_LINE_SPLIT) {
extmark_splice(curbuf, (int)new_cursor.lnum-1, col, 0, 0, 0,
(int)y_size+1, 0, totsize+1, kExtmarkUndo);
// Account for last pasted NL + last NL
extmark_splice(curbuf, (int)new_cursor.lnum-1, col + 1, 0, 0, 0,
(int)y_size+1, 0, totsize+2, kExtmarkUndo);
}
}