aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-09-11 19:14:41 +0800
committerckelsel <ckelsel@hotmail.com>2017-09-11 19:14:41 +0800
commit5ad5bb0c0c1be5fec7e3073dc63d30e19ad26a82 (patch)
tree9f9d762925f8457632ec80cc2082d0f0516a300b
parentaf2dd6827299070d81218e9ba54646bfaf53607c (diff)
parentf51a397010dcf4a8308c3b0249810696375b82b2 (diff)
downloadrneovim-5ad5bb0c0c1be5fec7e3073dc63d30e19ad26a82.tar.gz
rneovim-5ad5bb0c0c1be5fec7e3073dc63d30e19ad26a82.tar.bz2
rneovim-5ad5bb0c0c1be5fec7e3073dc63d30e19ad26a82.zip
Merge remote-tracking branch 'upstream/master'
-rwxr-xr-xci/before_install.sh10
-rwxr-xr-xci/install.sh4
-rw-r--r--src/nvim/eval.c24
-rw-r--r--src/nvim/normal.c5
-rw-r--r--src/nvim/ops.c2
-rw-r--r--src/nvim/testdir/test_visual.vim13
-rw-r--r--src/nvim/version.c6
-rw-r--r--test/functional/legacy/assert_spec.lua2
8 files changed, 42 insertions, 24 deletions
diff --git a/ci/before_install.sh b/ci/before_install.sh
index 8b0603eb16..f84ad935bc 100755
--- a/ci/before_install.sh
+++ b/ci/before_install.sh
@@ -32,10 +32,8 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
echo "Upgrade Python 3 pip."
pip3 -q install --user --upgrade pip
else
- if command -v pip3 ; then
- echo "Upgrade Python 3 pip."
- pip3 -q install --user --upgrade pip
- else
- echo 'warning: missing pip3'
- fi
+ echo "Upgrade Python 3 pip."
+ # Allow failure. pyenv pip3 on travis is broken:
+ # https://github.com/travis-ci/travis-ci/issues/8363
+ pip3 -q install --user --upgrade pip || true
fi
diff --git a/ci/install.sh b/ci/install.sh
index 4ee99e1e44..c8a0c8825d 100755
--- a/ci/install.sh
+++ b/ci/install.sh
@@ -17,7 +17,9 @@ echo "Install neovim module and coveralls for Python 2."
CC=cc pip2.7 -q install --user --upgrade neovim cpp-coveralls
echo "Install neovim module for Python 3."
-CC=cc pip3 -q install --user --upgrade neovim
+# Allow failure. pyenv pip3 on travis is broken:
+# https://github.com/travis-ci/travis-ci/issues/8363
+CC=cc pip3 -q install --user --upgrade neovim || true
echo "Install neovim RubyGem."
gem install --no-document --version ">= 0.2.0" neovim
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index d6ee13857a..5ee91d417a 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -6747,6 +6747,8 @@ static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv,
} else {
if (atype == ASSERT_MATCH || atype == ASSERT_NOTMATCH) {
ga_concat(gap, (char_u *)"Pattern ");
+ } else if (atype == ASSERT_NOTEQUAL) {
+ ga_concat(gap, (char_u *)"Expected not equal to ");
} else {
ga_concat(gap, (char_u *)"Expected ");
}
@@ -6757,18 +6759,18 @@ static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv,
} else {
ga_concat(gap, exp_str);
}
- tofree = (char_u *)encode_tv2string(got_tv, NULL);
- if (atype == ASSERT_MATCH) {
- ga_concat(gap, (char_u *)" does not match ");
- } else if (atype == ASSERT_NOTMATCH) {
- ga_concat(gap, (char_u *)" does match ");
- } else if (atype == ASSERT_NOTEQUAL) {
- ga_concat(gap, (char_u *)" differs from ");
- } else {
- ga_concat(gap, (char_u *)" but got ");
+ if (atype != ASSERT_NOTEQUAL) {
+ if (atype == ASSERT_MATCH) {
+ ga_concat(gap, (char_u *)" does not match ");
+ } else if (atype == ASSERT_NOTMATCH) {
+ ga_concat(gap, (char_u *)" does match ");
+ } else {
+ ga_concat(gap, (char_u *)" but got ");
+ }
+ tofree = (char_u *)encode_tv2string(got_tv, NULL);
+ ga_concat(gap, tofree);
+ xfree(tofree);
}
- ga_concat(gap, tofree);
- xfree(tofree);
}
}
diff --git a/src/nvim/normal.c b/src/nvim/normal.c
index 6415bec846..c40ed58550 100644
--- a/src/nvim/normal.c
+++ b/src/nvim/normal.c
@@ -1942,8 +1942,11 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
* the lines. */
auto_format(false, true);
- if (restart_edit == 0)
+ if (restart_edit == 0) {
restart_edit = restart_edit_save;
+ } else {
+ cap->retval |= CA_COMMAND_BUSY;
+ }
}
break;
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index c01840cfd0..99dc4670f1 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -2060,7 +2060,7 @@ void op_insert(oparg_T *oap, long count1)
}
t1 = oap->start;
- edit(NUL, false, (linenr_T)count1);
+ (void)edit(NUL, false, (linenr_T)count1);
// When a tab was inserted, and the characters in front of the tab
// have been converted to a tab as well, the column of the cursor
diff --git a/src/nvim/testdir/test_visual.vim b/src/nvim/testdir/test_visual.vim
index cf0e535937..74c26e3d66 100644
--- a/src/nvim/testdir/test_visual.vim
+++ b/src/nvim/testdir/test_visual.vim
@@ -15,3 +15,16 @@ func Test_block_shift_multibyte()
call assert_equal(' ヹxxx', getline(2))
q!
endfunc
+
+func Test_Visual_ctrl_o()
+ new
+ call setline(1, ['one', 'two', 'three'])
+ call cursor(1,2)
+ set noshowmode
+ set tw=0
+ call feedkeys("\<c-v>jjlIa\<c-\>\<c-o>:set tw=88\<cr>\<esc>", 'tx')
+ call assert_equal(['oane', 'tawo', 'tahree'], getline(1, 3))
+ call assert_equal(88, &tw)
+ set tw&
+ bw!
+endfu
diff --git a/src/nvim/version.c b/src/nvim/version.c
index ce1cc03c1f..4c0071f248 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -661,7 +661,7 @@ static const int included_patches[] = {
// 294,
// 293,
// 292,
- // 291,
+ 291,
290,
// 289,
// 288 NA
@@ -670,7 +670,7 @@ static const int included_patches[] = {
// 285 NA
// 284 NA
// 283,
- // 282,
+ 282,
// 281 NA
280,
// 279 NA
@@ -766,7 +766,7 @@ static const int included_patches[] = {
// 189,
188,
// 187 NA
- // 186,
+ 186,
// 185,
// 184,
// 183,
diff --git a/test/functional/legacy/assert_spec.lua b/test/functional/legacy/assert_spec.lua
index d646e8dbf4..381461dc4f 100644
--- a/test/functional/legacy/assert_spec.lua
+++ b/test/functional/legacy/assert_spec.lua
@@ -89,7 +89,7 @@ describe('assert function:', function()
it('should change v:errors when expected is equal to actual', function()
call('assert_notequal', 'foo', 'foo')
- expected_errors({"Expected 'foo' differs from 'foo'"})
+ expected_errors({"Expected not equal to 'foo'"})
end)
end)