aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/msgpack_rpc/channel.c26
-rw-r--r--src/nvim/testdir/test100.in6
-rw-r--r--src/nvim/testdir/test72.in1
-rw-r--r--src/nvim/version.c26
-rw-r--r--test/functional/api/vim_spec.lua2
-rw-r--r--test/functional/clipboard/clipboard_provider_spec.lua6
-rw-r--r--test/functional/helpers.lua3
-rw-r--r--test/functional/ui/screen.lua8
8 files changed, 50 insertions, 28 deletions
diff --git a/src/nvim/msgpack_rpc/channel.c b/src/nvim/msgpack_rpc/channel.c
index c8f8252e6d..920274f850 100644
--- a/src/nvim/msgpack_rpc/channel.c
+++ b/src/nvim/msgpack_rpc/channel.c
@@ -442,17 +442,18 @@ static void handle_request(Channel *channel, msgpack_object *request)
if (error.set) {
// Validation failed, send response with error
- channel_write(channel,
- serialize_response(channel->id,
- request_id,
- &error,
- NIL,
- &out_buffer));
- char buf[256];
- snprintf(buf, sizeof(buf),
- "Channel %" PRIu64 " sent an invalid message, closing.",
- channel->id);
- call_set_error(channel, buf);
+ if (channel_write(channel,
+ serialize_response(channel->id,
+ request_id,
+ &error,
+ NIL,
+ &out_buffer))) {
+ char buf[256];
+ snprintf(buf, sizeof(buf),
+ "Channel %" PRIu64 " sent an invalid message, closing.",
+ channel->id);
+ call_set_error(channel, buf);
+ }
return;
}
@@ -619,8 +620,7 @@ static void unsubscribe(Channel *channel, char *event)
free(event_string);
}
-/// Close the channel streams/job. The channel resources will be freed by
-/// free_channel later.
+/// Close the channel streams/job and free the channel resources.
static void close_channel(Channel *channel)
{
if (channel->closed) {
diff --git a/src/nvim/testdir/test100.in b/src/nvim/testdir/test100.in
index 083b4324b2..bc1a55e4d3 100644
--- a/src/nvim/testdir/test100.in
+++ b/src/nvim/testdir/test100.in
@@ -18,7 +18,7 @@ STARTTEST
:call FillBuffer()
:earlier 10
:call UndoLevel()
-:set ft=unix
+:set ff=unix
:%w! test.out
:new two
:0put ='TWO: expecting global undolevels: 5, local undolevels: 2 (first) then 10 (afterwards)'
@@ -28,7 +28,7 @@ STARTTEST
:call UndoLevel()
:setlocal ul=10
:call UndoLevel()
-:set ft=unix
+:set ff=unix
:%w >> test.out
:wincmd p
:redir >>test.out | echo "global value shouldn't be changed and still be 5!" | echo 'ONE: expecting global undolevels: 5, local undolevels: -123456 (default)'|:setglobal undolevels? | echon ' global' | setlocal undolevels? | echon ' local' |echo "" |redir end
@@ -37,7 +37,7 @@ STARTTEST
:1put ='global value should be changed to 50'
:2put ='THREE: expecting global undolevels: 50, local undolevels: -123456 (default)'
:call UndoLevel()
-:set ft=unix
+:set ff=unix
:%w >> test.out
:"sleep 10
:"
diff --git a/src/nvim/testdir/test72.in b/src/nvim/testdir/test72.in
index 20897f01a0..912fa19ba6 100644
--- a/src/nvim/testdir/test72.in
+++ b/src/nvim/testdir/test72.in
@@ -8,7 +8,6 @@ STARTTEST
:" Test 'undofile': first a simple one-line change.
:set visualbell
:set ul=100 undofile nomore
-:set ft=unix
:e! Xtestfile
ggdGithis is one line:set ul=100
:s/one/ONE/
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 83dc3c700b..b0bd38b7de 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -178,6 +178,28 @@ static char *(features[]) = {
};
static int included_patches[] = {
+ //589 NA
+ //588,
+ //587,
+ //586 NA
+ //585,
+ //584 NA
+ //583 NA
+ //582,
+ //581,
+ //580,
+ //579,
+ //578,
+ //577,
+ //576,
+ //575,
+ //574,
+ //573,
+ //572,
+ //571 NA
+ //570 NA
+ //569,
+ //568,
567,
//566,
//565,
@@ -245,7 +267,7 @@ static int included_patches[] = {
//503,
//502,
//501 NA
- //500,
+ 500,
499,
//498 NA
//497,
@@ -294,7 +316,7 @@ static int included_patches[] = {
454,
//453 NA
452,
- //451,
+ //451 NA
450,
449,
//448 NA
diff --git a/test/functional/api/vim_spec.lua b/test/functional/api/vim_spec.lua
index 2c17a2acd0..bee9c18bd8 100644
--- a/test/functional/api/vim_spec.lua
+++ b/test/functional/api/vim_spec.lua
@@ -117,7 +117,7 @@ describe('vim_* functions', function()
describe('replace_termcodes', function()
it('escapes K_SPECIAL as K_SPECIAL KS_SPECIAL KE_FILLER', function()
- eq(helpers.nvim('replace_termcodes', '\x80', true, true, true), '\x80\xfeX')
+ eq(helpers.nvim('replace_termcodes', '\128', true, true, true), '\128\254X')
end)
it('leaves non K_SPECIAL string unchanged', function()
diff --git a/test/functional/clipboard/clipboard_provider_spec.lua b/test/functional/clipboard/clipboard_provider_spec.lua
index ccbb74e487..c412c26c1a 100644
--- a/test/functional/clipboard/clipboard_provider_spec.lua
+++ b/test/functional/clipboard/clipboard_provider_spec.lua
@@ -72,10 +72,10 @@ describe('clipboard usage', function()
reset()
-- handle null bytes
- insert("some\x16000text\n\x16000very binary\x16000")
+ insert("some\022000text\n\022000very binary\022000")
feed('"*y-+"*p')
eq({'some\ntext', '\nvery binary\n',''}, eval("g:test_clip['*']"))
- expect("some\x00text\n\x00very binary\x00\nsome\x00text\n\x00very binary\x00")
+ expect("some\00text\n\00very binary\00\nsome\00text\n\00very binary\00")
-- test getreg/getregtype
eq('some\ntext\n\nvery binary\n\n', eval("getreg('*', 1)"))
@@ -92,7 +92,7 @@ describe('clipboard usage', function()
expect([[
very much
blocktext]])
- eq("\x165", eval("getregtype('*')"))
+ eq("\0225", eval("getregtype('*')"))
reset()
-- test setreg
diff --git a/test/functional/helpers.lua b/test/functional/helpers.lua
index fc699d22a3..c76979e894 100644
--- a/test/functional/helpers.lua
+++ b/test/functional/helpers.lua
@@ -5,7 +5,8 @@ local AsyncSession = require('nvim.async_session')
local Session = require('nvim.session')
local nvim_prog = os.getenv('NVIM_PROG') or 'build/bin/nvim'
-local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N', '--embed'}
+local nvim_argv = {nvim_prog, '-u', 'NONE', '-i', 'NONE', '-N',
+ '--cmd', 'set shortmess+=I background=light', '--embed'}
local prepend_argv
if os.getenv('VALGRIND') then
diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua
index 105e43843c..27e5900338 100644
--- a/test/functional/ui/screen.lua
+++ b/test/functional/ui/screen.lua
@@ -219,7 +219,7 @@ end
function Screen:_handle_eol_clear()
local row, col = self._cursor.row, self._cursor.col
- self:_clear_block(row, 1, col, self._scroll_region.right - col)
+ self:_clear_block(row, row, col, self._scroll_region.right)
end
function Screen:_handle_cursor_goto(row, col)
@@ -330,9 +330,9 @@ function Screen:_handle_set_icon(icon)
self.icon = icon
end
-function Screen:_clear_block(top, lines, left, columns)
- for i = top, top + lines - 1 do
- self:_clear_row_section(i, left, left + columns - 1)
+function Screen:_clear_block(top, bot, left, right)
+ for i = top, bot do
+ self:_clear_row_section(i, left, right)
end
end