Mercurial > vim
view runtime/syntax/testdir/dumps/sh_06_01.dump @ 35554:7633f991b4d3
runtime(syntax-tests): Allow for folded and wrapped lines in syntax test files
Commit: https://github.com/vim/vim/commit/8418446644e379a01d991dea1a70cbf69597a390
Author: Aliaksei Budavei <0x000c70@gmail.com>
Date: Tue May 21 01:10:26 2024 +0300
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>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 06 Jul 2024 12:15:05 +0200 |
parents | 695b50472e85 |
children |
line wrap: on
line source
|U+0#00e0e07#ffffff0|s|a|g|e| |(|)| |{| +0#0000000&@64 @75 |#+0#0000e05&| |d|o|e|s| |t|h|i|s| |c|o|m@1|e|n|t| |w|o|r|k|?| +0#0000000&@49 |V+0#00e0e07&|a|r|i|a|b|l|e|N|a|m|e|=+0#0000000&|"+0#af5f00255&|$+0#e000e06&|{|B|a|s|i|c|C|o|n|f|i|g|N|a|m|e|}|_+0#e000002&|*|"+0#af5f00255&| +0#0000000&@39 @75 >#+0#0000e05&| |E|c|h|o| |s|o|m|e| |k|s|h| |s|p|e|c|i|a|l| |v|a|r|i|a|b|l|e|s| +0#0000000&@41 |e+0#af5f00255&|c|h|o| +0#e000002&|"+0#af5f00255&|C+0#e000002&|D|P|A|T|H|=|"+0#af5f00255&|$+0#e000e06&|{|C|D|P|A|T|H|}| +0#0000000&@51 @75 |#+0#0000e05&| |G|e|t| |a|l|s|o| |a| |s|h|o|r|t| |d|e|s|c|r|i|p|t|i|o|n| |o|f| |t|h|e| |b|a|c|k|u|p|t|y|p|e|/|m|e|t|h|o|d| +0#0000000&@19 |e+0#af5f00255&|v|a|l| +0#0000000&|B+0#00e0e07&|a|c|k|u|p|M|e|t|h|o|d|=+0#0000000&|\+0#e000e06&|$|m+0#0000000&|e|s@1|0|9|$+0#e000e06&|{|B|a|c|k|u|p|T|y|p|e|}|B+0#0000000&| @34 @75 |c+0#af5f00255&|a|s|e| +0#0000000&|$+0#e000e06&|B|a|c|k|u|p|T|y|p|e| +0#0000000&|i+0#af5f00255&|n| +0#0000000&@55 @2|3|)+0#af5f00255&| +0#0000000&@2|D+0#00e0e07&|e|f|a|u|l|t|D|e|v|i|c|e|=+0#0000000&|$+0#e000e06&|M|o|u|n|t|D|e|v|i|c|e| +0#0000000&@3|;+0#af5f00255&@1| +0#0000000&@35 @2|1|||2|)+0#af5f00255&| +0#0000000&|D+0#00e0e07&|e|f|a|u|l|t|D|e|v|i|c|e|=+0#0000000&|$+0#e000e06&|T|a|p|e|D|r|i|v|e| +0#0000000&@5|;+0#af5f00255&@1| +0#0000000&@35 |e+0#af5f00255&|s|a|c| +0#0000000&@70 @75 |#+0#0000e05&| |I|f| |w|e| |h|a|v|e| |m|o|r|e| |t|h|e| |5|3| |c|h|a|r|a|c|t|e|r|s| |i|n| |t|h|e| |v|a|r|i|a|b|l|e|s| |b|e|l|o|w| |s|p|l|i|t| |t|h|e|m| |u|p| +0#0000000&@2 |#+0#0000e05&| |i|n|t|o| |s|e|v|e|r|a|l| |l|i|n|e|s| |a|n|d| |a|d@1| |3| |t|a|b|s| |b|e|f|o|r|e| |t|h|e|m| +0#0000000&@27 |f+0#af5f00255&|o|r| +0#0000000&|V|a|r|i|a|b|l|e| |i+0#af5f00255&|n| +0#0000000&|D|e|f|a|u|l|t|E|x|c|l|u|d|e| |D|e|f|a|u|l|t|F|i|n|d|O|p|t|i|o|n| |D|o|N|o|t|B|a|c|k|u|p|L|i|s|t| @10 @57|1|7|,|1| @9|2|1|%|