diff --git a/src/nvim/eval/window.c b/src/nvim/eval/window.c index a5f6b9e6a6..46a16ca1af 100644 --- a/src/nvim/eval/window.c +++ b/src/nvim/eval/window.c @@ -177,6 +177,7 @@ win_T *find_win_by_nr(typval_T *vp, tabpage_T *tp) /// Find a window: When using a Window ID in any tab page, when using a number /// in the current tab page. +/// Returns NULL when not found. win_T *find_win_by_nr_or_id(typval_T *vp) { int nr = (int)tv_get_number_chk(vp, NULL); diff --git a/src/nvim/getchar.c b/src/nvim/getchar.c index 3e3effe1f6..39797546b7 100644 --- a/src/nvim/getchar.c +++ b/src/nvim/getchar.c @@ -2675,7 +2675,7 @@ static int vgetorpeek(bool advance) if (result == map_result_get) { // get a character: 2. from the typeahead buffer - c = typebuf.tb_buf[typebuf.tb_off] & 255; + c = typebuf.tb_buf[typebuf.tb_off]; if (advance) { // remove chars from tb_buf cmd_silent = (typebuf.tb_silent > 0); if (typebuf.tb_maplen > 0) { diff --git a/test/old/testdir/runtest.vim b/test/old/testdir/runtest.vim index 7a1d7304ea..f606f37f41 100644 --- a/test/old/testdir/runtest.vim +++ b/test/old/testdir/runtest.vim @@ -375,6 +375,11 @@ func RunTheTest(test) au! au SwapExists * call HandleSwapExists() + " Close any stray popup windows + if has('popupwin') + call popup_clear() + endif + " Close any extra tab pages and windows and make the current one not modified. while tabpagenr('$') > 1 let winid = win_getid() diff --git a/test/old/testdir/test_execute_func.vim b/test/old/testdir/test_execute_func.vim index ec8ed160c3..1f6492b994 100644 --- a/test/old/testdir/test_execute_func.vim +++ b/test/old/testdir/test_execute_func.vim @@ -99,7 +99,7 @@ func Test_win_execute() let line = win_execute(134343, 'echo getline(1)') call assert_equal('', line) - if has('textprop') + if has('popupwin') let popupwin = popup_create('the popup win', {'line': 2, 'col': 3}) redraw let line = 'echo getline(1)'->win_execute(popupwin)