mirror of
https://github.com/vim/vim.git
synced 2025-09-29 04:34:16 -04:00
runtime(syntax-tests): Allow for folded and wrapped lines in syntax test files
The current implementation falls short for syntax test files on two accounts: 1. With folded lines -- some lines before folded lines are unnecessarily repeated in generated dump files because closed folded lines are always treated as opened for the cursor to move _in_ instead of to move _over_ them. 2. With wrapped lines (longer than 75 columns) -- some lines are omitted in generated dump files because calculations for the cursor progress and its movement commands only refer to file lines and not their layout within a 20x75 buffer (less &cmdheight). As an alternative, we abandon deterministic (and inaccurate at times) calculations for the cursor progress and, instead, advance the cursor by as much as before for a single dump file, but now rely on marking the last visible line and additional movement to position lines at desired offsets, carefully preserving compatibility for the &scrolloff and &ruler values inherited from defaults.vim. The parent Vim process will keep track of progress through a syntax test file made by its child process ("terminal") by reading the rightmost end of the ruler line from the terminal buffer, looking for " All " or " Bot " for its cue to finish dump file generation. With these changes applied, the lossless line length limit will be raised from 75 to 1425 (for a 19x75 view) columns. Also, prefer "lastline" to "truncate" for &display; hiding the content of any last _long_ line in a view goes against the purpose of syntax file testing -- all lines should be recorded. related: #15150 fixes: #14245 Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f397549332
commit
8418446644
@@ -1,9 +1,10 @@
|
||||
| +0&#ffffff0@5|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
|
||||
| +0&#ffffff0@5|"+0#0000e05&|\| |s|k|i|p|n|l| |o|p|t|i|o|n| +0#0000000&@52
|
||||
@6|\+0#e000e06&| +0#0000000&|s+0#e000e06&|k|i|p|n|l| +0#0000000&@60
|
||||
@6|"+0#0000e05&|\| |c|o|n|t|a|i|n|s| |o|p|t|i|o|n| +0#0000000&@50
|
||||
@6|\+0#e000e06&| +0#0000000&|c+0#e000e06&|o|n|t|a|i|n|s|=|t+0#0000000&|e|s|t|C|o|n|t|a|i|n|e|d|1|,|t|e|s|t|C|o|n|t|a|i|n|e|d|2| @28
|
||||
@6|"+0#0000e05&|\| |f|o|l|d| |o|p|t|i|o|n| +0#0000000&@54
|
||||
@6|\+0#e000e06&| +0#0000000&|f+0#e000e06&|o|l|d| +0#0000000&@62
|
||||
@6>"+0#0000e05&|\| |d|i|s|p|l|a|y| |o|p|t|i|o|n| +0#0000000&@51
|
||||
@6>\+0#e000e06&| +0#0000000&|f+0#e000e06&|o|l|d| +0#0000000&@62
|
||||
@6|"+0#0000e05&|\| |d|i|s|p|l|a|y| |o|p|t|i|o|n| +0#0000000&@51
|
||||
@6|\+0#e000e06&| +0#0000000&|d+0#e000e06&|i|s|p|l|a|y| +0#0000000&@59
|
||||
@6|"+0#0000e05&|\| |e|x|t|e|n|d| |o|p|t|i|o|n| +0#0000000&@52
|
||||
@6|\+0#e000e06&| +0#0000000&|e+0#e000e06&|x|t|e|n|d| +0#0000000&@60
|
||||
@@ -16,5 +17,4 @@
|
||||
@6|"+0#0000e05&|\| |O|P|T|I|O|N|S| +0#0000000&@58
|
||||
@6|"+0#0000e05&|\| |s|t|a|r|t| |o|p|t|i|o|n| +0#0000000&@53
|
||||
@6|\+0#e000e06&| +0#0000000&|s+0#00e0003&|t|a|r|t|=|"+0#e000002&|s|t|a|r|t|-|p|a|t@1|e|r|n|"| +0#0000000&@45
|
||||
@6|"+0#0000e05&|\| |s|k|i|p| |o|p|t|i|o|n| +0#0000000&@54
|
||||
@57|7|3|,|7| @9|4|2|%|
|
||||
@57|7|2|,|7| @9|4|1|%|
|
||||
|
Reference in New Issue
Block a user