diff options
| author | Maxime Coste <mawww@kakoune.org> | 2019-04-24 11:38:11 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2019-04-24 11:40:57 +0100 |
| commit | 1c8f1cbc2ffac964e2cbac6f5cf1d97e2f3bafb4 (patch) | |
| tree | b2cafda2559b3e64ce0f8a0e57475cbb60618415 /test | |
| parent | 64ddd43be943f0247dd8823a2564387dcb1aa622 (diff) | |
Fix wrapping of words with 'wrap col - indent < word len < wrap col'
Add a test case for those, and refactor bits of the wrap highlighter.
This explains part of the needed complexity in #2820.
Diffstat (limited to 'test')
| -rw-r--r-- | test/regression/2245-wrap-long-word/cmd | 1 | ||||
| -rw-r--r-- | test/regression/2245-wrap-long-word/in | 4 | ||||
| -rw-r--r-- | test/regression/2245-wrap-long-word/rc | 1 | ||||
| -rw-r--r-- | test/regression/2245-wrap-long-word/ui-out | 7 |
4 files changed, 13 insertions, 0 deletions
diff --git a/test/regression/2245-wrap-long-word/cmd b/test/regression/2245-wrap-long-word/cmd new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/test/regression/2245-wrap-long-word/cmd @@ -0,0 +1 @@ + diff --git a/test/regression/2245-wrap-long-word/in b/test/regression/2245-wrap-long-word/in new file mode 100644 index 00000000..28bbf0fc --- /dev/null +++ b/test/regression/2245-wrap-long-word/in @@ -0,0 +1,4 @@ + short line + + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong line + looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong line diff --git a/test/regression/2245-wrap-long-word/rc b/test/regression/2245-wrap-long-word/rc new file mode 100644 index 00000000..37739d90 --- /dev/null +++ b/test/regression/2245-wrap-long-word/rc @@ -0,0 +1 @@ +add-highlighter global/ wrap -word -indent diff --git a/test/regression/2245-wrap-long-word/ui-out b/test/regression/2245-wrap-long-word/ui-out new file mode 100644 index 00000000..719bf285 --- /dev/null +++ b/test/regression/2245-wrap-long-word/ui-out @@ -0,0 +1,7 @@ +{ "jsonrpc": "2.0", "method": "set_ui_options", "params": [{}] } +{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "attributes": [] }, "contents": " " }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " short line\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " line\u000a" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "ng line\u000a" }]], { "fg": "default", "bg": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "attributes": [] }] } +{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] } +{ "jsonrpc": "2.0", "method": "info_hide", "params": [] } +{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "out 1:1 " }, { "face": { "fg": "black", "bg": "yellow", "attributes": [] }, "contents": "" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "1 sel" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " - client0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "attributes": [] }] } +{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 0, "column": 0 }] } +{ "jsonrpc": "2.0", "method": "refresh", "params": [true] } |
