aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-04-19 21:59:15 +0200
committerMarc André Tanner <mat@brain-dump.org>2016-04-19 21:59:15 +0200
commit6bff371e3cce703ffc2a9c0df7c89d361e4ebf00 (patch)
tree5462f3ca75de6eb193ea7303ab742712d53649a7
parentc62e3e2a864475a9a1f83c38c738def56b20849d (diff)
downloadvis-6bff371e3cce703ffc2a9c0df7c89d361e4ebf00.tar.gz
vis-6bff371e3cce703ffc2a9c0df7c89d361e4ebf00.tar.xz
test/vis: add test for :wq in normal mode with multiple cursors
This tests for a previous bug martanne/vis#276 where only part of the file was saved. Based on a patch from Tobias Mansfield-Williams.
-rw-r--r--vis/multiple-cursors/normal-mode-wq.in4
-rw-r--r--vis/multiple-cursors/normal-mode-wq.keys4
-rw-r--r--vis/multiple-cursors/normal-mode-wq.ref4
3 files changed, 12 insertions, 0 deletions
diff --git a/vis/multiple-cursors/normal-mode-wq.in b/vis/multiple-cursors/normal-mode-wq.in
new file mode 100644
index 0000000..b2a41f8
--- /dev/null
+++ b/vis/multiple-cursors/normal-mode-wq.in
@@ -0,0 +1,4 @@
+1: first
+2: second
+3: third
+4: fourth
diff --git a/vis/multiple-cursors/normal-mode-wq.keys b/vis/multiple-cursors/normal-mode-wq.keys
new file mode 100644
index 0000000..f8974a8
--- /dev/null
+++ b/vis/multiple-cursors/normal-mode-wq.keys
@@ -0,0 +1,4 @@
+vGI /* create cursor at start of every line */
+<C-k> /* move primary cursor up */
+<C-p> /* remove primary cursor */
+i /* switch to insert mode, so that <Esc> after test leaves cursors active */
diff --git a/vis/multiple-cursors/normal-mode-wq.ref b/vis/multiple-cursors/normal-mode-wq.ref
new file mode 100644
index 0000000..b2a41f8
--- /dev/null
+++ b/vis/multiple-cursors/normal-mode-wq.ref
@@ -0,0 +1,4 @@
+1: first
+2: second
+3: third
+4: fourth