diff options
author | bptato <nincsnevem662@gmail.com> | 2024-10-10 17:22:15 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-10-10 17:31:18 +0200 |
commit | 8c64d7cb4e54c289a6c18f6c144125196d888296 (patch) | |
tree | 4cc8de480912beebe62ccf9cf9ba826dc160fe2c /test/layout | |
parent | cf31d252ffe0aa195909a03efa714c6fc6e5fddf (diff) | |
download | chawan-8c64d7cb4e54c289a6c18f6c144125196d888296.tar.gz |
layout, pager: preserve tabs on display, selection & output
Substitute tabs with one of eight PUA characters based on their width, and convert them back in the pager: * TUI mode always prints spaces, but now handles tabs appropriately on cursor movement * dump mode tries to preserve hard tabs, but uses soft tabs when that is not possible (e.g. tabs after a margin, tab with background color, etc) * selection mode always outputs hard tabs.
Diffstat (limited to 'test/layout')
-rw-r--r-- | test/layout/tabs.color.expected | 9 | ||||
-rw-r--r-- | test/layout/tabs.html | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/test/layout/tabs.color.expected b/test/layout/tabs.color.expected index 3d08349c..c0375438 100644 --- a/test/layout/tabs.color.expected +++ b/test/layout/tabs.color.expected @@ -2,5 +2,12 @@ [48;2;255;0;0mx y [49m [48;2;255;0;0mx y [49m [48;2;255;0;0mx y [49m -[48;2;255;0;0m^ The above rows should be aligned [49m +[48;2;255;0;0m^ The above rows should be aligned, and dump mode should output spaces. [49m +Without bgcolor: + +x y +x y +x y +^ The above rows should be aligned, and dump mode should output real tab +characters. diff --git a/test/layout/tabs.html b/test/layout/tabs.html index 509a656c..8292e25f 100644 --- a/test/layout/tabs.html +++ b/test/layout/tabs.html @@ -3,5 +3,13 @@ x y x y x y -^ The above rows should be aligned +^ The above rows should be aligned, and dump mode should output spaces. +</pre> +Without bgcolor: +<pre> +x y +x y +x y +^ The above rows should be aligned, and dump mode should output real tab +characters. </pre> |