From 753401ab4cea8fc81731403fe587558e36e7388f Mon Sep 17 00:00:00 2001 From: oni-link Date: Thu, 22 May 2014 14:37:27 +0200 Subject: vim-patch:7.4.267 Problem: The '[ mark is in the wrong position after "gq". (Ingo Karkat) Solution: Add the setmark argument to do_join(). (Christian Brabandt) https://code.google.com/p/vim/source/detail?r=75f222d67cea335efbe0274de6340dba174c1e7e --- src/nvim/testdir/Makefile | 3 ++- src/nvim/testdir/test_autoformat_join.in | 23 +++++++++++++++++++++++ src/nvim/testdir/test_autoformat_join.ok | 8 ++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 src/nvim/testdir/test_autoformat_join.in create mode 100644 src/nvim/testdir/test_autoformat_join.ok (limited to 'src/nvim/testdir') diff --git a/src/nvim/testdir/Makefile b/src/nvim/testdir/Makefile index 2497f8a5ba..5582a9f159 100644 --- a/src/nvim/testdir/Makefile +++ b/src/nvim/testdir/Makefile @@ -6,7 +6,8 @@ export SHELL := sh VIMPROG := ../../../build/bin/nvim -SCRIPTS := test_eval.out \ +SCRIPTS := test_autoformat_join.out \ + test_eval.out \ test1.out test2.out test3.out test4.out test5.out \ test6.out test7.out test8.out test9.out test10.out \ test11.out test12.out test13.out test14.out test15.out \ diff --git a/src/nvim/testdir/test_autoformat_join.in b/src/nvim/testdir/test_autoformat_join.in new file mode 100644 index 0000000000..f1e1c868d3 --- /dev/null +++ b/src/nvim/testdir/test_autoformat_join.in @@ -0,0 +1,23 @@ +Tests for setting the '[,'] marks when joining lines. + +STARTTEST +:so small.vim +:/^\t\t/ +0gqj +:let a=string(getpos("'[")).'/'.string(getpos("']")) +:/^This line/;'}-join +:let b=string(getpos("'[")).'/'.string(getpos("']")) +:$put ='First test: Start/End '.string(a) +:$put ='Second test: Start/End '.string(b) +:/^\t\t/,$wq! test.out +ENDTEST + + + O sodales, ludite, vos qui +attamen consulite per voster honur. Tua pulchra facies me fay planszer milies + +This line. +Should be joined with the next line +and with this line + +Results: diff --git a/src/nvim/testdir/test_autoformat_join.ok b/src/nvim/testdir/test_autoformat_join.ok new file mode 100644 index 0000000000..3b1df79514 --- /dev/null +++ b/src/nvim/testdir/test_autoformat_join.ok @@ -0,0 +1,8 @@ + O sodales, ludite, vos qui attamen consulite per voster honur. +Tua pulchra facies me fay planszer milies + +This line. Should be joined with the next line and with this line + +Results: +First test: Start/End '[0, 16, 1, 0]/[0, 17, 1, 0]' +Second test: Start/End '[0, 19, 11, 0]/[0, 19, 67, 0]' -- cgit