Patch 9.0.0147
Problem: Cursor positioned wrong after two text properties with virtual
text and "below" alignment. (Tim Pope)
Solution: Do not stop after a text property using MAXCOL. (closes #10849)
Files: src/charset.c, src/testdir/test_textprop.vim,
src/testdir/dumps/Test_prop_with_text_after_1.dump
*** ../vim-9.0.0146/src/charset.c 2022-08-05 13:06:51.619363752 +0100
--- src/charset.c 2022-08-05 20:24:38.682982582 +0100
***************
*** 1173,1179 ****
size += cells;
}
}
! if (tp->tp_col - 1 > col)
break;
}
}
--- 1173,1179 ----
size += cells;
}
}
! if (tp->tp_col != MAXCOL && tp->tp_col - 1 > col)
break;
}
}
*** ../vim-9.0.0146/src/testdir/test_textprop.vim 2022-08-05
19:46:44.554471098 +0100
--- src/testdir/test_textprop.vim 2022-08-05 20:17:39.535578444 +0100
***************
*** 2318,2323 ****
--- 2318,2324 ----
call prop_add(1, 0, #{type: 'rightprop', text: ' RIGHT ', text_align:
'right'})
call prop_add(1, 0, #{type: 'afterprop', text: "\tAFTER\t", text_align:
'after'})
call prop_add(1, 0, #{type: 'belowprop', text: ' BELOW ', text_align:
'below'})
+ call prop_add(1, 0, #{type: 'belowprop', text: ' ALSO BELOW ',
text_align: 'below'})
call setline(2, 'Last line.')
call prop_add(2, 0, #{type: 'afterprop', text: ' After Last ',
text_align: 'after'})
***************
*** 2327,2333 ****
call prop_add(3, 0, #{type: 'rightprop', text: 'söme和平téxt',
text_align: 'right'})
END
call writefile(lines, 'XscriptPropsWithTextAfter')
! let buf = RunVimInTerminal('-S XscriptPropsWithTextAfter', #{rows: 6, cols:
60})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_1', {})
call StopVimInTerminal(buf)
--- 2328,2334 ----
call prop_add(3, 0, #{type: 'rightprop', text: 'söme和平téxt',
text_align: 'right'})
END
call writefile(lines, 'XscriptPropsWithTextAfter')
! let buf = RunVimInTerminal('-S XscriptPropsWithTextAfter', #{rows: 8, cols:
60})
call VerifyScreenDump(buf, 'Test_prop_with_text_after_1', {})
call StopVimInTerminal(buf)
*** ../vim-9.0.0146/src/testdir/dumps/Test_prop_with_text_after_1.dump
2022-08-01 16:50:58.869575285 +0100
--- src/testdir/dumps/Test_prop_with_text_after_1.dump 2022-08-05
20:17:51.883560346 +0100
***************
*** 1,6 ****
--- 1,8 ----
|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
+ | +0fd7ff255|A|L|S|O| |B|E|L|O|W| | +0&#ffffff0@47
|L|a|s|t| |l|i|n|e>.| +0&#ffff4012|A|f|t|e|r| |L|a|s|t| | +0&#ffffff0@37
|r|i|g|h|t| |h|e|r|e| @37|s+0#ffffff16#e000002|ö|m|e|和*&|平|t+&|é|x|t
|~+0#4040ff13#ffffff0| @58
+ |~| @58
| +0#0000000&@41|2|,|1|0| @9|A|l@1|
*** ../vim-9.0.0146/src/version.c 2022-08-05 20:03:51.520868744 +0100
--- src/version.c 2022-08-05 20:14:36.915851785 +0100
***************
*** 737,738 ****
--- 737,740 ----
{ /* Add new patch number below this line */
+ /**/
+ 147,
/**/
--
hundred-and-one symptoms of being an internet addict:
246. You use up your free 1 Gbyte in two days.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/20220805192620.04AC41C0EC3%40moolenaar.net.