diff options
| author | Maxime Coste <mawww@kakoune.org> | 2025-06-28 12:29:28 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-06-28 12:41:46 +1000 |
| commit | 767a7df6c9b614f1a1c623027758ee3dbd25a75e (patch) | |
| tree | fb89edb8d9f45c1d86c68476469c45f710d68c90 /test | |
| parent | ee23c00b569f31430ca5b6a1f01596f7df55f900 (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')
| -rw-r--r-- | test/highlight/wrap/interact-with-show-whitespaces/cmd | 1 | ||||
| -rw-r--r-- | test/highlight/wrap/interact-with-show-whitespaces/in | 1 | ||||
| -rw-r--r-- | test/highlight/wrap/interact-with-show-whitespaces/rc | 2 | ||||
| -rw-r--r-- | test/highlight/wrap/interact-with-show-whitespaces/script | 4 | ||||
| -rw-r--r-- | test/highlight/wrap/word/cmd | 1 | ||||
| -rw-r--r-- | test/highlight/wrap/word/in | 3 | ||||
| -rw-r--r-- | test/highlight/wrap/word/rc | 1 | ||||
| -rw-r--r-- | test/highlight/wrap/word/script | 4 |
8 files changed, 17 insertions, 0 deletions
diff --git a/test/highlight/wrap/interact-with-show-whitespaces/cmd b/test/highlight/wrap/interact-with-show-whitespaces/cmd new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/test/highlight/wrap/interact-with-show-whitespaces/cmd @@ -0,0 +1 @@ + diff --git a/test/highlight/wrap/interact-with-show-whitespaces/in b/test/highlight/wrap/interact-with-show-whitespaces/in new file mode 100644 index 00000000..d675fa44 --- /dev/null +++ b/test/highlight/wrap/interact-with-show-whitespaces/in @@ -0,0 +1 @@ +foo bar diff --git a/test/highlight/wrap/interact-with-show-whitespaces/rc b/test/highlight/wrap/interact-with-show-whitespaces/rc new file mode 100644 index 00000000..37119e08 --- /dev/null +++ b/test/highlight/wrap/interact-with-show-whitespaces/rc @@ -0,0 +1,2 @@ +add-highlighter window/ wrap -word -width 5 +add-highlighter window/ show-whitespaces diff --git a/test/highlight/wrap/interact-with-show-whitespaces/script b/test/highlight/wrap/interact-with-show-whitespaces/script new file mode 100644 index 00000000..538ab98a --- /dev/null +++ b/test/highlight/wrap/interact-with-show-whitespaces/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": "f" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "oo" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": ["final_fg"] }, "contents": "·" }], [{ "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, "contents": "bar" }, { "face": { "fg": "default", "bg": "default", "underline": "default", "attributes": ["final_fg"] }, "contents": "¬" }]], { "fg": "default", "bg": "default", "underline": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "underline": "default", "attributes": [] }] }' +ui_out -until '{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }' + 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] }' + |
