init_chartabsize_arg(&cts, wp, lnum, wlv.vcol, line, ptr);
cts.cts_max_head_vcol = v;
- while (cts.cts_vcol < v && *cts.cts_ptr != NUL)
+ while (cts.cts_vcol < v)
{
head = 0;
charsize = win_lbr_chartabsize(&cts, &head);
cts.cts_vcol += charsize;
prev_ptr = cts.cts_ptr;
+ if (*prev_ptr == NUL)
+ break;
MB_PTR_ADV(cts.cts_ptr);
if (wp->w_p_list)
{
--- /dev/null
+|0+0&#ffffff0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9
+|>+0#4040ff13&| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002| +0#0000000#ffffff0@46
+|f|o@1| @46
+|b+8&&|a>r| @46
+| +0&&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002| +0#0000000#ffffff0@46
+|f|o@1| @46
+|b+8&&|a>r| @46
+|~+0#4040ff13&| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002| +0#0000000#ffffff0@46
+|f|o@1| @46
+|b+8&&|a>r| @46
+|~+0#4040ff13&| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002| +0#0000000#ffffff0@46
+|f|o@1| @46
+|b+8&&|a>r| @46
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002| +0#0000000#ffffff0@46
+|f|o@1| @46
+|b+8&&|a>r| @46
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|f+0&#ffffff0|o@1| @46
+|b+8&&|a>r| @46
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|B|o|t|
--- /dev/null
+|0+0&#ffffff0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|x+0#ffffff16#e000002
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|f+0#0000000#ffffff0|o@1| @46
+|b+8&&|a>r| @46
+|~+0#4040ff13&| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|f+0#0000000#ffffff0|o@1| @46
+|b+8&&|a>r| @46
+|~+0#4040ff13&| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|f+0#0000000#ffffff0|o@1| @46
+|b+8&&|a>r| @46
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|f+0#0000000#ffffff0|o@1| @46
+|b+8&&|a>r| @46
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|f+0&#ffffff0|o@1| @46
+|b+8&&|a>r| @46
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|B|o|t|
--- /dev/null
+|0+0&#ffffff0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|x+0#ffffff16#e000002
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |$| +0#0000000&@46
+|f|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+| +0&&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |$| +0#0000000&@46
+|f|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+|~+0#4040ff13&| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |$| +0#0000000&@46
+|f|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+|~+0#4040ff13&| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |$| +0#0000000&@46
+|f|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |$| +0#0000000&@46
+|f|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|f+0&#ffffff0|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|B|o|t|
--- /dev/null
+|0+0&#ffffff0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|8|9|0|1|2|3|4|5|6|7|x+0#ffffff16#e000002@1
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@46|$+0#4040ff13#ffffff0
+|f+0#0000000&|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+|~+0#4040ff13&| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@46|$+0#4040ff13#ffffff0
+|f+0#0000000&|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+|~+0#4040ff13&| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@47
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@46|$+0#4040ff13#ffffff0
+|f+0#0000000&|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|>+0#4040ff13#ffffff0| |x+0#ffffff16#e000002@46|$+0#4040ff13#ffffff0
+|f+0#0000000&|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|A|l@1|
--- /dev/null
+|f+0&#ffffff0|o@1|$+0#4040ff13&| +0#0000000&@45
+|b+8&&|a>r|$+8#4040ff13&| +8#0000000&@45
+|~+0#4040ff13&| @48
+|~| @48
+|~| @48
+|~| @48
+|~| @48
+| +0#0000000&@31|3|,|3| @10|B|o|t|
call StopVimInTerminal(buf)
endfunc
+func Test_text_eol_long_wrap_smoothscroll()
+ CheckScreendump
+ CheckRunVimInTerminal
+
+ let lines =<< trim END
+ call setline(1, [repeat('0123456789', 5), 'foo', 'bar'])
+ normal! G$
+ call prop_type_add('Test', #{highlight: 'ErrorMsg'})
+ call prop_add(1, 51, #{type: 'Test', text: repeat('x', 145), text_wrap: 'wrap'})
+
+ set cursorline scrolloff=0 showbreak=>\ smoothscroll
+ END
+ call writefile(lines, 'XTestEolLongWrapSms', 'D')
+ let buf = RunVimInTerminal('-S XTestEolLongWrapSms', #{rows: 8, cols: 50})
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_01', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_02', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_03', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_04', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_05', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_06', {})
+
+ call term_sendkeys(buf, 'gg$xG$')
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_07', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_08', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_09', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_10', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_11', {})
+
+ call term_sendkeys(buf, "zb:set list listchars=eol:$ | echo\<CR>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_12', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_13', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_14', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_15', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_16', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_17', {})
+
+ call term_sendkeys(buf, 'gg$xG$')
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_18', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_19', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_20', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_21', {})
+ call term_sendkeys(buf, "\<C-E>")
+ call VerifyScreenDump(buf, 'Test_text_eol_long_wrap_sms_22', {})
+
+ call StopVimInTerminal(buf)
+endfunc
+
func Test_text_below_nowrap()
CheckScreendump
CheckRunVimInTerminal
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 1798,
/**/
1797,
/**/