diff options
-rw-r--r-- | runtime/doc/options.txt | 4 | ||||
-rw-r--r-- | runtime/pack/dist/opt/termdebug/plugin/termdebug.vim | 109 | ||||
-rw-r--r-- | src/nvim/buffer.c | 18 | ||||
-rw-r--r-- | src/nvim/edit.c | 4 | ||||
-rw-r--r-- | src/nvim/eval.c | 6 | ||||
-rw-r--r-- | src/nvim/ex_getln.c | 38 | ||||
-rw-r--r-- | src/nvim/options.lua | 8 | ||||
-rw-r--r-- | src/nvim/popupmnu.c | 4 | ||||
-rw-r--r-- | src/nvim/screen.c | 16 | ||||
-rw-r--r-- | src/nvim/syntax.c | 2 | ||||
-rw-r--r-- | src/nvim/testdir/setup.vim | 3 | ||||
-rw-r--r-- | src/nvim/ui.c | 6 | ||||
-rw-r--r-- | src/nvim/window.c | 10 | ||||
-rw-r--r-- | test/functional/options/num_options_spec.lua | 4 |
14 files changed, 164 insertions, 68 deletions
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index bf75bebb80..b6ea63449d 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -3134,7 +3134,7 @@ A jump table for the options with a short description can be found at |Q_op|. may change in later releases. *'iminsert'* *'imi'* -'iminsert' 'imi' number (default 0, 2 when an input method is supported) +'iminsert' 'imi' number (default 0) local to buffer Specifies whether :lmap or an Input Method (IM) is to be used in Insert mode. Valid values: @@ -3154,7 +3154,7 @@ A jump table for the options with a short description can be found at |Q_op|. It is also used for the argument of commands like "r" and "f". *'imsearch'* *'ims'* -'imsearch' 'ims' number (default 0, 2 when an input method is supported) +'imsearch' 'ims' number (default -1) local to buffer Specifies whether :lmap or an Input Method (IM) is to be used when entering a search pattern. Valid values: diff --git a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim index b002cad4c6..506179297a 100644 --- a/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim +++ b/runtime/pack/dist/opt/termdebug/plugin/termdebug.vim @@ -1,40 +1,133 @@ -" Debugger commands. +" Debugger plugin using gdb. " " WORK IN PROGRESS - much doesn't work yet " -" Open two terminal windows: +" Open two visible terminal windows: " 1. run a pty, as with ":term NONE" " 2. run gdb, passing the pty -" The current window is used to edit source code and follows gdb. +" The current window is used to view source code and follows gdb. +" +" A third terminal window is hidden, it is used for communication with gdb. +" +" The communication with gdb uses GDB/MI. See: +" https://sourceware.org/gdb/current/onlinedocs/gdb/GDB_002fMI.html " " Author: Bram Moolenaar -" Copyright: Vim license applies +" Copyright: Vim license applies, see ":help license" " In case this gets loaded twice. if exists(':Termdebug') finish endif +" The command that starts debugging, e.g. ":Termdebug vim". +" To end type "quit" in the gdb window. command -nargs=* -complete=file Termdebug call s:StartDebug(<q-args>) +" Name of the gdb command, defaults to "gdb". if !exists('debugger') let debugger = 'gdb' endif +" Sign used to highlight the line where the program has stopped. +sign define debugPC linehl=debugPC +if &background == 'light' + hi debugPC term=reverse ctermbg=lightblue guibg=lightblue +else + hi debugPC term=reverse ctermbg=darkblue guibg=darkblue +endif +let s:pc_id = 12 + func s:StartDebug(cmd) + let s:startwin = win_getid(winnr()) + let s:startsigncolumn = &signcolumn + " Open a terminal window without a job, to run the debugged program - let s:ptybuf = term_start('NONE', {}) - let pty = job_info(term_getjob(s:ptybuf))['tty'] + let s:ptybuf = term_start('NONE', { + \ 'term_name': 'gdb program', + \ }) + if s:ptybuf == 0 + echoerr 'Failed to open the program terminal window' + return + endif + let pty = job_info(term_getjob(s:ptybuf))['tty_out'] + + " Create a hidden terminal window to communicate with gdb + let s:commbuf = term_start('NONE', { + \ 'term_name': 'gdb communication', + \ 'out_cb': function('s:CommOutput'), + \ 'hidden': 1, + \ }) + if s:commbuf == 0 + echoerr 'Failed to open the communication terminal window' + exe 'bwipe! ' . s:ptybuf + return + endif + let commpty = job_info(term_getjob(s:commbuf))['tty_out'] " Open a terminal window to run the debugger. let cmd = [g:debugger, '-tty', pty, a:cmd] echomsg 'executing "' . join(cmd) . '"' let gdbbuf = term_start(cmd, { \ 'exit_cb': function('s:EndDebug'), - \ 'term_finish': 'close' + \ 'term_finish': 'close', \ }) + if gdbbuf == 0 + echoerr 'Failed to open the gdb terminal window' + exe 'bwipe! ' . s:ptybuf + exe 'bwipe! ' . s:commbuf + return + endif + + " Connect gdb to the communication pty, using the GDB/MI interface + call term_sendkeys(gdbbuf, 'new-ui mi ' . commpty . "\r") endfunc func s:EndDebug(job, status) - exe 'bwipe! ' . s:ptybuf + exe 'bwipe! ' . s:ptybuf + exe 'bwipe! ' . s:commbuf + call setwinvar(s:startwin, '&signcolumn', s:startsigncolumn) +endfunc + +" Handle a message received from gdb on the GDB/MI interface. +func s:CommOutput(chan, msg) + let msgs = split(a:msg, "\r") + + for msg in msgs + " remove prefixed NL + if msg[0] == "\n" + let msg = msg[1:] + endif + if msg != '' + if msg =~ '^\*\(stopped\|running\)' + let wid = win_getid(winnr()) + + if win_gotoid(s:startwin) + if msg =~ '^\*stopped' + " TODO: proper parsing + let fname = substitute(msg, '.*fullname="\([^"]*\)".*', '\1', '') + let lnum = substitute(msg, '.*line="\([^"]*\)".*', '\1', '') + if lnum =~ '^[0-9]*$' + if expand('%:h') != fname + if &modified + " TODO: find existing window + exe 'split ' . fnameescape(fname) + let s:startwin = win_getid(winnr()) + else + exe 'edit ' . fnameescape(fname) + endif + endif + exe lnum + exe 'sign place ' . s:pc_id . ' line=' . lnum . ' name=debugPC file=' . fnameescape(fname) + setlocal signcolumn=yes + endif + else + exe 'sign unplace ' . s:pc_id + endif + + call win_gotoid(wid) + endif + endif + endif + endfor endfunc diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c index 7b90cbe4f4..802eba06a5 100644 --- a/src/nvim/buffer.c +++ b/src/nvim/buffer.c @@ -3224,6 +3224,9 @@ int build_stl_str_hl( #define TMPLEN 70 char_u tmp[TMPLEN]; char_u *usefmt = fmt; + const int save_must_redraw = must_redraw; + const int save_redr_type = curwin->w_redr_type; + const int save_highlight_shcnaged = need_highlight_changed; // When the format starts with "%!" then evaluate it as an expression and // use the result as the actual format string. @@ -3632,16 +3635,16 @@ int build_stl_str_hl( vim_snprintf((char *)tmp, sizeof(tmp), "%d", curbuf->b_fnum); set_internal_string_var((char_u *)"g:actual_curbuf", tmp); - buf_T *o_curbuf = curbuf; - win_T *o_curwin = curwin; + buf_T *const save_curbuf = curbuf; + win_T *const save_curwin = curwin; curwin = wp; curbuf = wp->w_buffer; // Note: The result stored in `t` is unused. str = eval_to_string_safe(out_p, &t, use_sandbox); - curwin = o_curwin; - curbuf = o_curbuf; + curwin = save_curwin; + curbuf = save_curbuf; // Remove the variable we just stored do_unlet(S_LEN("g:actual_curbuf"), true); @@ -4262,6 +4265,13 @@ int build_stl_str_hl( cur_tab_rec->def.func = NULL; } + // We do not want redrawing a stausline, ruler, title, etc. to trigger + // another redraw, it may cause an endless loop. This happens when a + // statusline changes a highlight group. + must_redraw = save_must_redraw; + curwin->w_redr_type = save_redr_type; + need_highlight_changed = save_highlight_shcnaged; + return width; } diff --git a/src/nvim/edit.c b/src/nvim/edit.c index a63dd97ba8..62b35fa708 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -2495,10 +2495,6 @@ static int compl_match_arraysize; /* - * Update the screen and when there is any scrolling remove the popup menu. - */ - -/* * Remove any popup menu. */ static void ins_compl_del_pum(void) diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 3980516d32..df02a5ba17 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -11265,7 +11265,7 @@ void get_user_input(const typval_T *const argvars, // Only the part of the message after the last NL is considered as // prompt for the command line, unlsess cmdline is externalized const char *p = prompt; - if (!ui_is_external(kUICmdline)) { + if (!ui_has(kUICmdline)) { const char *lastnl = strrchr(prompt, '\n'); if (lastnl != NULL) { p = lastnl+1; @@ -19951,7 +19951,7 @@ void ex_function(exarg_T *eap) goto errret_2; } - if (KeyTyped && ui_is_external(kUICmdline)) { + if (KeyTyped && ui_has(kUICmdline)) { show_block = true; ui_ext_cmdline_block_append(0, (const char *)eap->cmd); } @@ -20007,7 +20007,7 @@ void ex_function(exarg_T *eap) if (!eap->skip && did_emsg) goto erret; - if (!ui_is_external(kUICmdline)) { + if (!ui_has(kUICmdline)) { msg_putchar('\n'); // don't overwrite the function name } cmdline_row = msg_row; diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index bd03160bcd..e8375cd3cc 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -494,7 +494,7 @@ static uint8_t *command_line_enter(int firstc, long count, int indent) char_u *p = ccline.cmdbuff; - if (ui_is_external(kUICmdline)) { + if (ui_has(kUICmdline)) { ui_call_cmdline_hide(ccline.level); } @@ -614,7 +614,7 @@ static int command_line_execute(VimState *state, int key) if (!(s->c == p_wc && KeyTyped) && s->c != p_wcm && s->c != Ctrl_N && s->c != Ctrl_P && s->c != Ctrl_A && s->c != Ctrl_L) { - if (ui_is_external(kUIWildmenu)) { + if (ui_has(kUIWildmenu)) { ui_call_wildmenu_hide(); } if (s->xpc.xp_numfiles != -1) { @@ -896,7 +896,7 @@ static int command_line_execute(VimState *state, int key) } if (!cmd_silent) { - if (!ui_is_external(kUICmdline)) { + if (!ui_has(kUICmdline)) { ui_cursor_goto(msg_row, 0); } ui_flush(); @@ -1254,7 +1254,7 @@ static int command_line_handle_key(CommandLineState *s) xfree(ccline.cmdbuff); // no commandline to return ccline.cmdbuff = NULL; - if (!cmd_silent && !ui_is_external(kUICmdline)) { + if (!cmd_silent && !ui_has(kUICmdline)) { if (cmdmsg_rl) { msg_col = Columns; } else { @@ -1704,7 +1704,7 @@ static int command_line_handle_key(CommandLineState *s) s->do_abbr = false; // don't do abbreviation now // may need to remove ^ when composing char was typed if (enc_utf8 && utf_iscomposing(s->c) && !cmd_silent) { - if (ui_is_external(kUICmdline)) { + if (ui_has(kUICmdline)) { // TODO(bfredl): why not make unputcmdline also work with true? unputcmdline(); } else { @@ -1968,7 +1968,7 @@ static int command_line_changed(CommandLineState *s) // Do it only when there are no characters left to read // to avoid useless intermediate redraws. // if cmdline is external the ui handles shaping, no redraw needed. - if (!ui_is_external(kUICmdline) && vpeekc() == NUL) { + if (!ui_has(kUICmdline) && vpeekc() == NUL) { redrawcmd(); } } @@ -2835,7 +2835,7 @@ static void draw_cmdline(int start, int len) return; } - if (ui_is_external(kUICmdline)) { + if (ui_has(kUICmdline)) { ccline.special_char = NUL; ccline.redraw_state = kCmdRedrawAll; return; @@ -3028,7 +3028,7 @@ void ui_ext_cmdline_block_leave(void) /// assumes "redrawcmdline()" will already be invoked void cmdline_screen_cleared(void) { - if (!ui_is_external(kUICmdline)) { + if (!ui_has(kUICmdline)) { return; } @@ -3053,7 +3053,7 @@ void cmdline_screen_cleared(void) /// called by ui_flush, do what redraws neccessary to keep cmdline updated. void cmdline_ui_flush(void) { - if (!ui_is_external(kUICmdline)) { + if (!ui_has(kUICmdline)) { return; } int level = ccline.level; @@ -3082,7 +3082,7 @@ void putcmdline(int c, int shift) if (cmd_silent) { return; } - if (!ui_is_external(kUICmdline)) { + if (!ui_has(kUICmdline)) { msg_no_more = true; msg_putchar(c); if (shift) { @@ -3108,7 +3108,7 @@ void unputcmdline(void) return; } msg_no_more = true; - if (ccline.cmdlen == ccline.cmdpos && !ui_is_external(kUICmdline)) { + if (ccline.cmdlen == ccline.cmdpos && !ui_has(kUICmdline)) { msg_putchar(' '); } else { draw_cmdline(ccline.cmdpos, mb_ptr2len(ccline.cmdbuff + ccline.cmdpos)); @@ -3423,7 +3423,7 @@ static void redrawcmdprompt(void) if (cmd_silent) return; - if (ui_is_external(kUICmdline)) { + if (ui_has(kUICmdline)) { ccline.redraw_state = kCmdRedrawAll; return; } @@ -3452,7 +3452,7 @@ void redrawcmd(void) if (cmd_silent) return; - if (ui_is_external(kUICmdline)) { + if (ui_has(kUICmdline)) { draw_cmdline(0, ccline.cmdlen); return; } @@ -3500,7 +3500,7 @@ static void cursorcmd(void) if (cmd_silent) return; - if (ui_is_external(kUICmdline)) { + if (ui_has(kUICmdline)) { if (ccline.redraw_state < kCmdRedrawPos) { ccline.redraw_state = kCmdRedrawPos; } @@ -3525,7 +3525,7 @@ static void cursorcmd(void) void gotocmdline(int clr) { - if (ui_is_external(kUICmdline)) { + if (ui_has(kUICmdline)) { return; } msg_start(); @@ -3613,7 +3613,7 @@ nextwild ( return FAIL; } - if (!ui_is_external(kUIWildmenu)) { + if (!ui_has(kUIWildmenu)) { MSG_PUTS("..."); // show that we are busy ui_flush(); } @@ -3763,7 +3763,7 @@ ExpandOne ( findex = -1; } if (p_wmnu) { - if (ui_is_external(kUIWildmenu)) { + if (ui_has(kUIWildmenu)) { ui_call_wildmenu_select(findex); } else { win_redr_status_matches(xp, xp->xp_numfiles, xp->xp_files, @@ -4118,7 +4118,7 @@ static int showmatches(expand_T *xp, int wildmenu) showtail = cmd_showtail; } - if (ui_is_external(kUIWildmenu)) { + if (ui_has(kUIWildmenu)) { Array args = ARRAY_DICT_INIT; for (i = 0; i < num_files; i++) { ADD(args, STRING_OBJ(cstr_to_string((char *)files_found[i]))); @@ -6124,7 +6124,7 @@ static int open_cmdwin(void) curwin->w_cursor.col = ccline.cmdpos; changed_line_abv_curs(); invalidate_botline(); - if (ui_is_external(kUICmdline)) { + if (ui_has(kUICmdline)) { ccline.redraw_state = kCmdRedrawNone; ui_call_cmdline_hide(ccline.level); } diff --git a/src/nvim/options.lua b/src/nvim/options.lua index c3aff87bbf..222ec5457b 100644 --- a/src/nvim/options.lua +++ b/src/nvim/options.lua @@ -1173,9 +1173,7 @@ return { vi_def=true, varname='p_iminsert', pv_name='p_imi', defaults={ - condition='B_IMODE_IM', - if_true={vi=macros('B_IMODE_IM')}, - if_false={vi=macros('B_IMODE_NONE')}, + if_true={vi=macros('B_IMODE_NONE')}, } }, { @@ -1184,9 +1182,7 @@ return { vi_def=true, varname='p_imsearch', pv_name='p_ims', defaults={ - condition='B_IMODE_IM', - if_true={vi=macros('B_IMODE_IM')}, - if_false={vi=macros('B_IMODE_NONE')}, + if_true={vi=macros('B_IMODE_USE_INSERT')}, } }, { diff --git a/src/nvim/popupmnu.c b/src/nvim/popupmnu.c index eac413f6ba..9b09006b5f 100644 --- a/src/nvim/popupmnu.c +++ b/src/nvim/popupmnu.c @@ -82,7 +82,7 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed) if (!pum_is_visible) { // To keep the code simple, we only allow changing the // draw mode when the popup menu is not being displayed - pum_external = ui_is_external(kUIPopupmenu); + pum_external = ui_has(kUIPopupmenu); } do { @@ -103,7 +103,7 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed) } int grid = (int)curwin->w_grid.handle; - if (!ui_is_external(kUIMultigrid)) { + if (!ui_has(kUIMultigrid)) { grid = (int)default_grid.handle; row += curwin->w_winrow; col += curwin->w_wincol; diff --git a/src/nvim/screen.c b/src/nvim/screen.c index 759eefaecc..014f63f400 100644 --- a/src/nvim/screen.c +++ b/src/nvim/screen.c @@ -4209,7 +4209,7 @@ win_line ( && lcs_eol_one != -1 // Haven't printed the lcs_eol character. && row != endrow - 1 // Not the last line being displayed. && (grid->Columns == Columns // Window spans the width of the screen, - || ui_is_external(kUIMultigrid)) // or has dedicated grid. + || ui_has(kUIMultigrid)) // or has dedicated grid. && !wp->w_p_rl; // Not right-to-left. grid_put_linebuf(grid, row, 0, col - boguscols, grid->Columns, wp->w_p_rl, wp, wp->w_hl_attr_normal, wrap); @@ -4816,8 +4816,6 @@ win_redr_status_matches ( /// Redraw the status line of window `wp`. /// /// If inversion is possible we use it. Else '=' characters are used. -/// If "ignore_pum" is true, also redraw statusline when the popup menu is -/// displayed. static void win_redr_status(win_T *wp) { int row; @@ -4832,7 +4830,7 @@ static void win_redr_status(win_T *wp) // invokes ":redrawstatus". Simply ignore the call then. if (busy // Also ignore if wildmenu is showing. - || (wild_menu_showing != 0 && !ui_is_external(kUIWildmenu))) { + || (wild_menu_showing != 0 && !ui_has(kUIWildmenu))) { return; } busy = true; @@ -5929,7 +5927,7 @@ void win_grid_alloc(win_T *wp) int cols = wp->w_width_inner; // TODO(bfredl): floating windows should force this to true - bool want_allocation = ui_is_external(kUIMultigrid); + bool want_allocation = ui_has(kUIMultigrid); bool has_allocation = (grid->chars != NULL); if (want_allocation && has_allocation && highlights_invalid) { @@ -5965,7 +5963,7 @@ void win_grid_alloc(win_T *wp) // - a grid was just resized // - screen_resize was called and all grid sizes must be sent // - the UI wants multigrid event (necessary) - if ((send_grid_resize || was_resized) && ui_is_external(kUIMultigrid)) { + if ((send_grid_resize || was_resized) && ui_has(kUIMultigrid)) { ui_call_grid_resize(grid->handle, grid->Columns, grid->Rows); } } @@ -6025,8 +6023,8 @@ retry: */ ++RedrawingDisabled; - // win_new_shellsize will recompute floats posititon, but tell the - // compositor to now redraw them yet + // win_new_shellsize will recompute floats position, but tell the + // compositor to not redraw them yet ui_comp_invalidate_screen(); win_new_shellsize(); /* fit the windows in the new sized shell */ @@ -6672,7 +6670,7 @@ static void draw_tabline(void) } redraw_tabline = false; - if (ui_is_external(kUITabline)) { + if (ui_has(kUITabline)) { ui_ext_tabline_update(); return; } diff --git a/src/nvim/syntax.c b/src/nvim/syntax.c index 81c78ca6a9..b6b7dfff11 100644 --- a/src/nvim/syntax.c +++ b/src/nvim/syntax.c @@ -6893,7 +6893,7 @@ void do_highlight(const char *line, const bool forceit, const bool init) // "fg", which have been changed now. highlight_attr_set_all(); - if (!ui_is_external(kUILinegrid) && starting == 0) { + if (!ui_has(kUILinegrid) && starting == 0) { // Older UIs assume that we clear the screen after normal group is // changed ui_refresh(); diff --git a/src/nvim/testdir/setup.vim b/src/nvim/testdir/setup.vim index c7c3b378cc..011433f19e 100644 --- a/src/nvim/testdir/setup.vim +++ b/src/nvim/testdir/setup.vim @@ -24,6 +24,9 @@ let $NVIM_LOG_FILE = exists($NVIM_LOG_FILE) ? $NVIM_LOG_FILE : 'Xnvim.log' set rtp=$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after let &packpath = &rtp +" Avoid storing shell history. +let $HISTFILE = "" + " Make sure $HOME does not get read or written. let $HOME = expand(getcwd() . '/XfakeHOME') if !isdirectory($HOME) diff --git a/src/nvim/ui.c b/src/nvim/ui.c index dd4eb0f196..6a7cbd36cc 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -413,10 +413,10 @@ void ui_cursor_shape(void) conceal_check_cursor_line(); } -/// Returns true if `widget` is externalized. -bool ui_is_external(UIExtension widget) +/// Returns true if the given UI extension is enabled. +bool ui_has(UIExtension ext) { - return ui_ext[widget]; + return ui_ext[ext]; } Array ui_array(void) diff --git a/src/nvim/window.c b/src/nvim/window.c index 91a983e4c7..e8b067d46c 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -3120,7 +3120,7 @@ int win_new_tabpage(int after, char_u *filename) redraw_all_later(NOT_VALID); - if (ui_is_external(kUIMultigrid)) { + if (ui_has(kUIMultigrid)) { tabpage_check_windows(tp); } @@ -3321,7 +3321,7 @@ static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, int trigger_enter_au lastwin = tp->tp_lastwin; topframe = tp->tp_topframe; - if (old_curtab != curtab && ui_is_external(kUIMultigrid)) { + if (old_curtab != curtab && ui_has(kUIMultigrid)) { tabpage_check_windows(old_curtab); } @@ -4011,7 +4011,7 @@ win_free ( void win_free_grid(win_T *wp, bool reinit) { - if (wp->w_grid.handle != 0 && ui_is_external(kUIMultigrid)) { + if (wp->w_grid.handle != 0 && ui_has(kUIMultigrid)) { ui_call_grid_destroy(wp->w_grid.handle); wp->w_grid.handle = 0; } @@ -5349,7 +5349,7 @@ static void last_status_rec(frame_T *fr, int statusline) */ int tabline_height(void) { - if (ui_is_external(kUITabline)) { + if (ui_has(kUITabline)) { return 0; } assert(first_tabpage); @@ -6086,7 +6086,7 @@ void win_findbuf(typval_T *argvars, list_T *list) void win_ui_flush(void) { - if (!ui_is_external(kUIMultigrid)) { + if (!ui_has(kUIMultigrid)) { return; } diff --git a/test/functional/options/num_options_spec.lua b/test/functional/options/num_options_spec.lua index fb0559054d..88e554c86f 100644 --- a/test/functional/options/num_options_spec.lua +++ b/test/functional/options/num_options_spec.lua @@ -32,9 +32,9 @@ describe(':setlocal', function() eq(0, meths.get_option('iminsert')) feed_command('setlocal iminsert=1') eq(0, meths.get_option('iminsert')) - eq(0, meths.get_option('imsearch')) + eq(-1, meths.get_option('imsearch')) feed_command('setlocal imsearch=1') - eq(0, meths.get_option('imsearch')) + eq(-1, meths.get_option('imsearch')) end) end) |