Merge remote-tracking branch 'upstream/master'

This commit is contained in:
ckelsel
2017-09-11 19:14:41 +08:00
8 changed files with 42 additions and 24 deletions

View File

@@ -32,10 +32,8 @@ if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
echo "Upgrade Python 3 pip." echo "Upgrade Python 3 pip."
pip3 -q install --user --upgrade pip pip3 -q install --user --upgrade pip
else else
if command -v pip3 ; then echo "Upgrade Python 3 pip."
echo "Upgrade Python 3 pip." # Allow failure. pyenv pip3 on travis is broken:
pip3 -q install --user --upgrade pip # https://github.com/travis-ci/travis-ci/issues/8363
else pip3 -q install --user --upgrade pip || true
echo 'warning: missing pip3'
fi
fi fi

View File

@@ -17,7 +17,9 @@ echo "Install neovim module and coveralls for Python 2."
CC=cc pip2.7 -q install --user --upgrade neovim cpp-coveralls CC=cc pip2.7 -q install --user --upgrade neovim cpp-coveralls
echo "Install neovim module for Python 3." 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." echo "Install neovim RubyGem."
gem install --no-document --version ">= 0.2.0" neovim gem install --no-document --version ">= 0.2.0" neovim

View File

@@ -6747,6 +6747,8 @@ static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv,
} else { } else {
if (atype == ASSERT_MATCH || atype == ASSERT_NOTMATCH) { if (atype == ASSERT_MATCH || atype == ASSERT_NOTMATCH) {
ga_concat(gap, (char_u *)"Pattern "); ga_concat(gap, (char_u *)"Pattern ");
} else if (atype == ASSERT_NOTEQUAL) {
ga_concat(gap, (char_u *)"Expected not equal to ");
} else { } else {
ga_concat(gap, (char_u *)"Expected "); ga_concat(gap, (char_u *)"Expected ");
} }
@@ -6757,18 +6759,18 @@ static void fill_assert_error(garray_T *gap, typval_T *opt_msg_tv,
} else { } else {
ga_concat(gap, exp_str); ga_concat(gap, exp_str);
} }
tofree = (char_u *)encode_tv2string(got_tv, NULL); if (atype != ASSERT_NOTEQUAL) {
if (atype == ASSERT_MATCH) { if (atype == ASSERT_MATCH) {
ga_concat(gap, (char_u *)" does not match "); ga_concat(gap, (char_u *)" does not match ");
} else if (atype == ASSERT_NOTMATCH) { } else if (atype == ASSERT_NOTMATCH) {
ga_concat(gap, (char_u *)" does match "); ga_concat(gap, (char_u *)" does match ");
} else if (atype == ASSERT_NOTEQUAL) { } else {
ga_concat(gap, (char_u *)" differs from "); ga_concat(gap, (char_u *)" but got ");
} 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);
} }
} }

View File

@@ -1942,8 +1942,11 @@ void do_pending_operator(cmdarg_T *cap, int old_col, bool gui_yank)
* the lines. */ * the lines. */
auto_format(false, true); auto_format(false, true);
if (restart_edit == 0) if (restart_edit == 0) {
restart_edit = restart_edit_save; restart_edit = restart_edit_save;
} else {
cap->retval |= CA_COMMAND_BUSY;
}
} }
break; break;

View File

@@ -2060,7 +2060,7 @@ void op_insert(oparg_T *oap, long count1)
} }
t1 = oap->start; 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 // 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 // have been converted to a tab as well, the column of the cursor

View File

@@ -15,3 +15,16 @@ func Test_block_shift_multibyte()
call assert_equal(' ヹxxx', getline(2)) call assert_equal(' ヹxxx', getline(2))
q! q!
endfunc 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

View File

@@ -661,7 +661,7 @@ static const int included_patches[] = {
// 294, // 294,
// 293, // 293,
// 292, // 292,
// 291, 291,
290, 290,
// 289, // 289,
// 288 NA // 288 NA
@@ -670,7 +670,7 @@ static const int included_patches[] = {
// 285 NA // 285 NA
// 284 NA // 284 NA
// 283, // 283,
// 282, 282,
// 281 NA // 281 NA
280, 280,
// 279 NA // 279 NA
@@ -766,7 +766,7 @@ static const int included_patches[] = {
// 189, // 189,
188, 188,
// 187 NA // 187 NA
// 186, 186,
// 185, // 185,
// 184, // 184,
// 183, // 183,

View File

@@ -89,7 +89,7 @@ describe('assert function:', function()
it('should change v:errors when expected is equal to actual', function() it('should change v:errors when expected is equal to actual', function()
call('assert_notequal', 'foo', 'foo') call('assert_notequal', 'foo', 'foo')
expected_errors({"Expected 'foo' differs from 'foo'"}) expected_errors({"Expected not equal to 'foo'"})
end) end)
end) end)