summaryrefslogtreecommitdiff
path: root/test/highlight/wrap/word
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2025-06-28 12:29:28 +1000
committerMaxime Coste <mawww@kakoune.org>2025-06-28 12:41:46 +1000
commit767a7df6c9b614f1a1c623027758ee3dbd25a75e (patch)
treefb89edb8d9f45c1d86c68476469c45f710d68c90 /test/highlight/wrap/word
parentee23c00b569f31430ca5b6a1f01596f7df55f900 (diff)
Fix wrap interaction with show-whitespaces and test word wrapping more
Consider atom boundaries as word boundaries, which should be correct du to passes ordering. Fixes #5350
Diffstat (limited to 'test/highlight/wrap/word')
-rw-r--r--test/highlight/wrap/word/cmd1
-rw-r--r--test/highlight/wrap/word/in3
-rw-r--r--test/highlight/wrap/word/rc1
-rw-r--r--test/highlight/wrap/word/script4
4 files changed, 9 insertions, 0 deletions
diff --git a/test/highlight/wrap/word/cmd b/test/highlight/wrap/word/cmd
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/test/highlight/wrap/word/cmd
@@ -0,0 +1 @@
+
diff --git a/test/highlight/wrap/word/in b/test/highlight/wrap/word/in
new file mode 100644
index 00000000..5cdc9a1d
--- /dev/null
+++ b/test/highlight/wrap/word/in
@@ -0,0 +1,3 @@
+123456789 wrap
+123456 wrap
+123456 wrap 1234 wrap 123456789012 wrap
diff --git a/test/highlight/wrap/word/rc b/test/highlight/wrap/word/rc
new file mode 100644
index 00000000..921daf40
--- /dev/null
+++ b/test/highlight/wrap/word/rc
@@ -0,0 +1 @@
+add-highlighter window/ wrap -word -width 10
diff --git a/test/highlight/wrap/word/script b/test/highlight/wrap/word/script
new file mode 100644
index 00000000..eb18dadc
--- /dev/null
+++ b/test/highlight/wrap/word/script
@@ -0,0 +1,4 @@
+ui_out '{ "jsonrpc": "2.0", "method": "set_ui_options", "params": [{}] }'
+ui_out '{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "underline": "default", "attributes": [] }, "contents": "1" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "23456789 " }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "wrap\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "123456 " }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "wrap\u000a" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "123456 " }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "wrap 1234 " }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "wrap 12345" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "6789012 " }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "wrap\u000a" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }'
+ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }'
+