summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2019-08-12 18:40:56 +1000
committerMaxime Coste <mawww@kakoune.org>2019-08-12 18:40:56 +1000
commitf1047181cb35fb5ee6e4e8bf85adfa4aafa4be19 (patch)
tree7e9bba104e5472774b54ea999a2aee3db948abf9 /test
parent0e4a4acf61dbcd1e025810f8e67aca2eaeb44e19 (diff)
Fallback to wrapping in between 'word' when 'WORD' fails
First try to break at a whitespace, if that fails (likely because that last WORD is too long for the wrapping width), then try to wrap at a 'word' boundary (on a non alphanumeric character). Fixes #3048
Diffstat (limited to 'test')
-rw-r--r--test/regression/3048-word-wrapping-broken/cmd1
-rw-r--r--test/regression/3048-word-wrapping-broken/in1
-rw-r--r--test/regression/3048-word-wrapping-broken/rc1
-rw-r--r--test/regression/3048-word-wrapping-broken/ui-out7
4 files changed, 10 insertions, 0 deletions
diff --git a/test/regression/3048-word-wrapping-broken/cmd b/test/regression/3048-word-wrapping-broken/cmd
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/test/regression/3048-word-wrapping-broken/cmd
@@ -0,0 +1 @@
+
diff --git a/test/regression/3048-word-wrapping-broken/in b/test/regression/3048-word-wrapping-broken/in
new file mode 100644
index 00000000..5fd2754d
--- /dev/null
+++ b/test/regression/3048-word-wrapping-broken/in
@@ -0,0 +1 @@
+[ab
diff --git a/test/regression/3048-word-wrapping-broken/rc b/test/regression/3048-word-wrapping-broken/rc
new file mode 100644
index 00000000..0abc95c6
--- /dev/null
+++ b/test/regression/3048-word-wrapping-broken/rc
@@ -0,0 +1 @@
+add-highlighter global/ wrap -word -width 2
diff --git a/test/regression/3048-word-wrapping-broken/ui-out b/test/regression/3048-word-wrapping-broken/ui-out
new file mode 100644
index 00000000..555d0d99
--- /dev/null
+++ b/test/regression/3048-word-wrapping-broken/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": "ab" }], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "\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] }