0
0
mirror of https://github.com/vim/vim.git synced 2025-09-29 04:34:16 -04:00

patch 9.0.0205: cursor in wrong position when inserting after virtual text

Problem:    Cursor in wrong position when inserting after virtual text. (Ben
            Jackson)
Solution:   Put the cursor after the virtual text, where the text will be
            inserted. (closes #10914)
This commit is contained in:
Bram Moolenaar
2022-08-14 13:28:55 +01:00
parent 63acae13f5
commit 28c9f89571
10 changed files with 83 additions and 2 deletions

View File

@@ -294,7 +294,9 @@ prop_add_one(
tmp_prop.tp_type = type->pt_id;
tmp_prop.tp_flags = text_flags
| (lnum > start_lnum ? TP_FLAG_CONT_PREV : 0)
| (lnum < end_lnum ? TP_FLAG_CONT_NEXT : 0);
| (lnum < end_lnum ? TP_FLAG_CONT_NEXT : 0)
| ((type->pt_flags & PT_FLAG_INS_START_INCL)
? TP_FLAG_START_INCL : 0);
mch_memmove(newprops + i * sizeof(textprop_T), &tmp_prop,
sizeof(textprop_T));