summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-08-01 11:17:40 +0100
committerBram Moolenaar <Bram@vim.org>2022-08-01 11:17:40 +0100
commit84b247fab70e9b76539c2a0e24556e7c66126974 (patch)
tree6987a9c629a6ca6320a0ee97c01cc4da2bed3955
parent101d57b34b72f4fbc7df1b6edfd64c64a6be14fc (diff)
patch 9.0.0125: cursor positioned wrong with virtual text after the linev9.0.0125
Problem: Cursor positioned wrong with virtual text after the line. Solution: Clear cts_with_trailing.
-rw-r--r--src/charset.c1
-rw-r--r--src/testdir/dumps/Test_prop_with_text_after_1.dump6
-rw-r--r--src/testdir/test_textprop.vim4
-rw-r--r--src/version.c2
4 files changed, 10 insertions, 3 deletions
diff --git a/src/charset.c b/src/charset.c
index e47fd89c60..a8173c1246 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -921,6 +921,7 @@ init_chartabsize_arg(
cts->cts_text_prop_count = 0;
cts->cts_has_prop_with_text = FALSE;
cts->cts_cur_text_width = 0;
+ cts->cts_with_trailing = 0;
if (lnum > 0)
{
char_u *prop_start;
diff --git a/src/testdir/dumps/Test_prop_with_text_after_1.dump b/src/testdir/dumps/Test_prop_with_text_after_1.dump
index 27ba6863ec..2996a6e09f 100644
--- a/src/testdir/dumps/Test_prop_with_text_after_1.dump
+++ b/src/testdir/dumps/Test_prop_with_text_after_1.dump
@@ -1,6 +1,6 @@
->s+0&#ffffff0|o|m|e| |t|e|x|t| |h|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |t|h|e|r|e| +0&#ffff4012|A|F|T|E|R| | +0&#ffffff0@10| +0#ffffff16#e000002|R|I|G|H|T|
+|s+0&#ffffff0|o|m|e| |t|e|x|t| |h|e|r|e| |a|n|d| |o|t|h|e|r| |t|e|x|t| |t|h|e|r|e| +0&#ffff4012|A|F|T|E|R| | +0&#ffffff0@10| +0#ffffff16#e000002|R|I|G|H|T|
| +0#0000000#5fd7ff255|B|E|L|O|W| | +0&#ffffff0@52
+|L|a|s|t| |l|i|n|e>.| +0&#ffff4012|A|f|t|e|r| |L|a|s|t| | +0&#ffffff0@37
|~+0#4040ff13&| @58
|~| @58
-|~| @58
-| +0#0000000&@41|1|,|1| @10|A|l@1|
+| +0#0000000&@41|2|,|1|0| @9|A|l@1|
diff --git a/src/testdir/test_textprop.vim b/src/testdir/test_textprop.vim
index 987df98dd2..5ac787e5e2 100644
--- a/src/testdir/test_textprop.vim
+++ b/src/testdir/test_textprop.vim
@@ -2224,6 +2224,10 @@ func Test_props_with_text_after()
call prop_add(1, 0, #{type: 'rightprop', text: ' RIGHT ', text_align: 'right'})
call prop_add(1, 0, #{type: 'afterprop', text: ' AFTER ', text_align: 'after'})
call prop_add(1, 0, #{type: 'belowprop', text: ' BELOW ', text_align: 'below'})
+
+ call setline(2, 'Last line.')
+ call prop_add(2, 0, #{type: 'afterprop', text: ' After Last ', text_align: 'after'})
+ normal G$
END
call writefile(lines, 'XscriptPropsWithTextAfter')
let buf = RunVimInTerminal('-S XscriptPropsWithTextAfter', #{rows: 6, cols: 60})
diff --git a/src/version.c b/src/version.c
index 212688ca09..4d45122bdb 100644
--- a/src/version.c
+++ b/src/version.c
@@ -736,6 +736,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 125,
+/**/
124,
/**/
123,