mirror of
https://github.com/vim/vim.git
synced 2025-08-22 19:27:53 -04:00
patch 9.0.0147: cursor positioned wrong after two "below" text properties
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)
This commit is contained in:
parent
4d2031fdbe
commit
50e75fe8d8
@ -1173,7 +1173,7 @@ win_lbr_chartabsize(
|
||||
size += cells;
|
||||
}
|
||||
}
|
||||
if (tp->tp_col - 1 > col)
|
||||
if (tp->tp_col != MAXCOL && tp->tp_col - 1 > col)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -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|
|
||||
|
@ -2318,6 +2318,7 @@ 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: "\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,7 +2328,7 @@ func Test_props_with_text_after()
|
||||
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})
|
||||
let buf = RunVimInTerminal('-S XscriptPropsWithTextAfter', #{rows: 8, cols: 60})
|
||||
call VerifyScreenDump(buf, 'Test_prop_with_text_after_1', {})
|
||||
|
||||
call StopVimInTerminal(buf)
|
||||
|
@ -735,6 +735,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
147,
|
||||
/**/
|
||||
146,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user