about summary refs log tree commit diff stats
path: root/test/layout
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-10-10 17:22:15 +0200
committerbptato <nincsnevem662@gmail.com>2024-10-10 17:31:18 +0200
commit8c64d7cb4e54c289a6c18f6c144125196d888296 (patch)
tree4cc8de480912beebe62ccf9cf9ba826dc160fe2c /test/layout
parentcf31d252ffe0aa195909a03efa714c6fc6e5fddf (diff)
downloadchawan-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.expected9
-rw-r--r--test/layout/tabs.html10
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 @@
 x       y                                                                       
 x       y                                                                       
 x       y                                                                       
-^ The above rows should be aligned                                              
+^ The above rows should be aligned, and dump mode should output spaces.         
 
+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>