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
						Christian Brabandt
					
				
			
			
				
	
			
			
			
						parent
						
							f397549332
						
					
				
				
					commit
					8418446644
				
			| @ -1,9 +1,10 @@ | ||||
| |(+0#0000e05#ffffff0|*| |o|c|t|a|l| |l|i|t|e|r|a|l|s| |*|)| +0#0000000&@54 | ||||
| | +0&#ffffff0@74 | ||||
| |(+0#0000e05&|*| |o|c|t|a|l| |l|i|t|e|r|a|l|s| |*|)| +0#0000000&@54 | ||||
| |n| |:+0#e000e06&|=| +0#0000000&|0+0#e000002&|3|7@1|B|;+0#e000e06&| +0#0000000&|c|h| |:+0#e000e06&|=| +0#0000000&|0+0#e000002&|3|7@1|C|;+0#e000e06&| +0#0000000&@50 | ||||
| @75 | ||||
| |(+0#0000e05&|*| |p|r|a|g|m|a|s| |*|)| +0#0000000&@61 | ||||
| |<+0#e000e06&|*|$|f|o@1|*|>| +0#0000000&@66 | ||||
| > @74 | ||||
| ><+0#e000e06&|*|$|f|o@1|*|>| +0#0000000&@66 | ||||
| @75 | ||||
| |(+0#0000e05&|*| |b|l|o|c|k| |c|o|m@1|e|n|t|s| |w|i|t|h| |e|m|p|h|a|s|i|s| |*|)| +0#0000000&@40 | ||||
| |(+0#0000e05&|*| |c+0#e000e06&|o|p|y|r|i|g|h|t| +0#0000e05&|(|c|)| |J|u|r@1|a|s|i|c| |I|n|c|.| +0#0000000&@44 | ||||
| | +0#0000e05&@2|a+0#e000e06&|u|t|h|o|r| +0#0000e05&|F|r|e|d| |F|l|i|n|t|s|t|o|n|e| |S|r|.| +0#0000000&@45 | ||||
| @ -16,5 +17,4 @@ | ||||
| |(+0#0000e05&|*| |t|e|c|h|n|i|c|a|l| |d|e|b|t| |m|a|r|k|e|r|s| |*|)| +0#0000000&@46 | ||||
| |(+0#0000e05&|*| |T+0#e000e06&|O|D|O|:| +0#0000e05&|.@2| |*|)| +0#0000000&@59 | ||||
| |(+0#0000e05&|*| |F+0#e000e06&|I|X|M|E| +0#0000e05&|*|)| +0#0000000&@63 | ||||
| |(+0#0000e05&|*| |D+0#e000e06&|E|P|R|E|C|A|T|E|D| +0#0000e05&|*|)| +0#0000000&@58 | ||||
| @57|5@1|,|0|-|1| @7|5|1|%|  | ||||
| @57|5|4|,|1| @9|5|0|%|  | ||||
|  | ||||
		Reference in New Issue
	
	Block a user