diff options
-rw-r--r-- | runtime/doc/editing.txt | 4 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 2 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 2 | ||||
-rw-r--r-- | runtime/indent/tcl.vim | 4 | ||||
-rw-r--r-- | runtime/lua/vim/lsp.lua | 7 | ||||
-rw-r--r-- | runtime/menu.vim | 4 | ||||
-rw-r--r-- | src/nvim/mouse.c | 71 | ||||
-rw-r--r-- | src/nvim/normal.c | 4 | ||||
-rw-r--r-- | src/nvim/undo.c | 114 | ||||
-rw-r--r-- | test/functional/lua/buffer_updates_spec.lua | 54 | ||||
-rw-r--r-- | test/functional/ui/fold_spec.lua | 367 |
11 files changed, 589 insertions, 44 deletions
diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index ac398ec494..aa964a521f 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -90,7 +90,7 @@ g CTRL-G Prints the current position of the cursor in five :buffers :files :ls List all the currently known file names. See - 'windows.txt' |:files| |:buffers| |:ls|. + |windows.txt| |:files| |:buffers| |:ls|. Vim will remember the full path name of a file name that you enter. In most cases when the file name is displayed only the name you typed is shown, but @@ -1190,7 +1190,7 @@ The syntax is best shown via some examples: > < Open the browser in the C:/bar directory, with the current buffer filename as default, and save the buffer under the filename chosen. -Also see the |'browsedir'| option. +Also see the 'browsedir' option. For versions of Vim where browsing is not supported, the command is executed unmodified. diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index 4a99aa47bf..d3647246fa 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -106,8 +106,6 @@ argument. This can be used to find out where time is spent while loading your |config|, plugins and opening the first file. When {fname} already exists new messages are appended. - (Only available when compiled with the |+startuptime| - feature). *-+* +[num] The cursor will be positioned on line "num" for the first diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 7da886dabd..b45e9ed450 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1715,7 +1715,7 @@ There are several html preprocessor languages out there. html.vim has been written such that it should be trivial to include it. To do so add the following two lines to the syntax coloring file for that language (the example comes from the asp.vim file): - +> runtime! syntax/html.vim syn cluster htmlPreproc add=asp diff --git a/runtime/indent/tcl.vim b/runtime/indent/tcl.vim index d77081841d..eafb8dd568 100644 --- a/runtime/indent/tcl.vim +++ b/runtime/indent/tcl.vim @@ -1,8 +1,8 @@ " Vim indent file " Language: Tcl -" Previous Maintainer: Nikolai Weibull <now@bitwi.se> " Latest Update: Chris Heithoff <chrisheithoff@gmail.com> -" Latest Revision: 2018-12-05 +" Previous Maintainer: Nikolai Weibull <now@bitwi.se> +" Latest Revision: 2018-12-05 if exists("b:did_indent") finish diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 143909fe41..841c365cbe 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -542,6 +542,13 @@ function lsp.start_client(config) client_ids[client_id] = nil end + if code ~= 0 or (signal ~= 0 and signal ~= 15) then + local msg = string.format("Client %s quit with exit code %s and signal %s", client_id, code, signal) + vim.schedule(function() + vim.notify(msg, vim.log.levels.WARN) + end) + end + if config.on_exit then pcall(config.on_exit, code, signal, client_id) end diff --git a/runtime/menu.vim b/runtime/menu.vim index 3756787e7f..cd56eb5583 100644 --- a/runtime/menu.vim +++ b/runtime/menu.vim @@ -356,8 +356,8 @@ func! s:SetupColorSchemes() abort let s:did_setup_color_schemes = 1 let n = globpath(&runtimepath, "colors/*.vim", 1, 1) - let n += globpath(&runtimepath, "pack/*/start/*/colors/*.vim", 1, 1) - let n += globpath(&runtimepath, "pack/*/opt/*/colors/*.vim", 1, 1) + let n += globpath(&packpath, "pack/*/start/*/colors/*.vim", 1, 1) + let n += globpath(&packpath, "pack/*/opt/*/colors/*.vim", 1, 1) " Ignore case for VMS and windows, sort on name let names = sort(map(n, 'substitute(v:val, "\\c.*[/\\\\:\\]]\\([^/\\\\:]*\\)\\.vim", "\\1", "")'), 1) diff --git a/src/nvim/mouse.c b/src/nvim/mouse.c index ff471ea978..f28658aa29 100644 --- a/src/nvim/mouse.c +++ b/src/nvim/mouse.c @@ -72,9 +72,7 @@ int jump_to_mouse(int flags, int row = mouse_row; int col = mouse_col; int grid = mouse_grid; - int mouse_char; int fdc = 0; - ScreenGrid *gp = &default_grid; mouse_past_bottom = false; mouse_past_eol = false; @@ -303,25 +301,6 @@ retnomove: } } - // Remember the character under the mouse, might be one of foldclose or - // foldopen fillchars in the fold column. - if (ui_has(kUIMultigrid)) { - gp = &curwin->w_grid; - } - if (row >= 0 && row < Rows && col >= 0 && col <= Columns - && gp->chars != NULL) { - mouse_char = utf_ptr2char(gp->chars[gp->line_offset[row] - + (unsigned)col]); - } else { - mouse_char = ' '; - } - - // Check for position outside of the fold column. - if (curwin->w_p_rl ? col < curwin->w_width_inner - fdc : - col >= fdc + (cmdwin_type == 0 ? 0 : 1)) { - mouse_char = ' '; - } - // compute the position in the buffer line from the posn on the screen if (mouse_comp_pos(curwin, &row, &col, &curwin->w_cursor.lnum)) { mouse_past_bottom = true; @@ -362,11 +341,7 @@ retnomove: count |= CURSOR_MOVED; // Cursor has moved } - if (mouse_char == curwin->w_p_fcs_chars.foldclosed) { - count |= MOUSE_FOLD_OPEN; - } else if (mouse_char != ' ') { - count |= MOUSE_FOLD_CLOSE; - } + count |= mouse_check_fold(); return count; } @@ -738,3 +713,47 @@ static int mouse_adjust_click(win_T *wp, int row, int col) return col + nudge; } + +// Check clicked cell is foldcolumn +int mouse_check_fold(void) +{ + int grid = mouse_grid; + int row = mouse_row; + int col = mouse_col; + int mouse_char = ' '; + + win_T *wp; + + wp = mouse_find_win(&grid, &row, &col); + + if (wp && mouse_row >= 0 && mouse_row < Rows + && mouse_col >= 0 && mouse_col <= Columns) { + int multigrid = ui_has(kUIMultigrid); + ScreenGrid *gp = multigrid ? &wp->w_grid : &default_grid; + int fdc = win_fdccol_count(wp); + + row = multigrid && mouse_grid == 0 ? row : mouse_row; + col = multigrid && mouse_grid == 0 ? col : mouse_col; + + // Remember the character under the mouse, might be one of foldclose or + // foldopen fillchars in the fold column. + if (gp->chars != NULL) { + mouse_char = utf_ptr2char(gp->chars[gp->line_offset[row] + + (unsigned)col]); + } + + // Check for position outside of the fold column. + if (wp->w_p_rl ? col < wp->w_width_inner - fdc : + col >= fdc + (cmdwin_type == 0 ? 0 : 1)) { + mouse_char = ' '; + } + } + + if (mouse_char == wp->w_p_fcs_chars.foldclosed) { + return MOUSE_FOLD_OPEN; + } else if (mouse_char != ' ') { + return MOUSE_FOLD_CLOSE; + } + + return 0; +} diff --git a/src/nvim/normal.c b/src/nvim/normal.c index d5c92bc3e6..4d8b11f832 100644 --- a/src/nvim/normal.c +++ b/src/nvim/normal.c @@ -2404,8 +2404,8 @@ do_mouse ( start_visual.lnum = 0; - /* Check for clicking in the tab page line. */ - if (mouse_row == 0 && firstwin->w_winrow > 0) { + // Check for clicking in the tab page line. + if (mouse_grid <= 1 && mouse_row == 0 && firstwin->w_winrow > 0) { if (is_drag) { if (in_tab_line) { move_tab_to_mouse(); diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 8c2ae3bc35..f52850f6f3 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -594,13 +594,20 @@ int u_savecommon(linenr_T top, linenr_T bot, linenr_T newbot, int reload) } -# define UF_START_MAGIC "Vim\237UnDo\345" /* magic at start of undofile */ +// magic at start of undofile +# define UF_START_MAGIC "Vim\237UnDo\345" # define UF_START_MAGIC_LEN 9 -# define UF_HEADER_MAGIC 0x5fd0 /* magic at start of header */ -# define UF_HEADER_END_MAGIC 0xe7aa /* magic after last header */ -# define UF_ENTRY_MAGIC 0xf518 /* magic at start of entry */ -# define UF_ENTRY_END_MAGIC 0x3581 /* magic after last entry */ -# define UF_VERSION 2 /* 2-byte undofile version number */ +// magic at start of header +# define UF_HEADER_MAGIC 0x5fd0 +// magic after last header +# define UF_HEADER_END_MAGIC 0xe7aa +// magic at start of entry +# define UF_ENTRY_MAGIC 0xf518 +// magic after last entry +# define UF_ENTRY_END_MAGIC 0x3581 + +// 2-byte undofile version number +# define UF_VERSION 3 /* extra fields for header */ # define UF_LAST_SAVE_NR 1 @@ -847,6 +854,15 @@ static bool serialize_uhp(bufinfo_T *bi, u_header_T *uhp) } } undo_write_bytes(bi, (uintmax_t)UF_ENTRY_END_MAGIC, 2); + + // Write all extmark undo objects + for (size_t i = 0; i < kv_size(uhp->uh_extmark); i++) { + if (!serialize_extmark(bi, kv_A(uhp->uh_extmark, i))) { + return false; + } + } + undo_write_bytes(bi, (uintmax_t)UF_ENTRY_END_MAGIC, 2); + return true; } @@ -928,9 +944,95 @@ static u_header_T *unserialize_uhp(bufinfo_T *bi, return NULL; } + // Unserialize all extmark undo information + ExtmarkUndoObject *extup; + kv_init(uhp->uh_extmark); + + while ((c = undo_read_2c(bi)) == UF_ENTRY_MAGIC) { + bool error = false; + extup = unserialize_extmark(bi, &error, file_name); + if (error) { + kv_destroy(uhp->uh_extmark); + xfree(extup); + return NULL; + } + kv_push(uhp->uh_extmark, *extup); + xfree(extup); + } + if (c != UF_ENTRY_END_MAGIC) { + corruption_error("entry end", file_name); + u_free_uhp(uhp); + return NULL; + } + return uhp; } +static bool serialize_extmark(bufinfo_T *bi, ExtmarkUndoObject extup) +{ + if (extup.type == kExtmarkSplice) { + undo_write_bytes(bi, (uintmax_t)UF_ENTRY_MAGIC, 2); + undo_write_bytes(bi, (uintmax_t)extup.type, 4); + if (!undo_write(bi, (uint8_t *)&(extup.data.splice), + sizeof(ExtmarkSplice))) { + return false; + } + } else if (extup.type == kExtmarkMove) { + undo_write_bytes(bi, (uintmax_t)UF_ENTRY_MAGIC, 2); + undo_write_bytes(bi, (uintmax_t)extup.type, 4); + if (!undo_write(bi, (uint8_t *)&(extup.data.move), sizeof(ExtmarkMove))) { + return false; + } + } + // Note: We do not serialize ExtmarkSavePos information, since + // buffer marktrees are not retained when closing/reopening a file + return true; +} + +static ExtmarkUndoObject *unserialize_extmark(bufinfo_T *bi, bool *error, + const char *filename) +{ + UndoObjectType type; + uint8_t *buf = NULL; + size_t n_elems; + + ExtmarkUndoObject *extup = xmalloc(sizeof(ExtmarkUndoObject)); + + type = (UndoObjectType)undo_read_4c(bi); + extup->type = type; + if (type == kExtmarkSplice) { + n_elems = (size_t)sizeof(ExtmarkSplice) / sizeof(uint8_t); + buf = xcalloc(sizeof(uint8_t), n_elems); + if (!undo_read(bi, buf, n_elems)) { + goto error; + } + extup->data.splice = *(ExtmarkSplice *)buf; + } else if (type == kExtmarkMove) { + n_elems = (size_t)sizeof(ExtmarkMove) / sizeof(uint8_t); + buf = xcalloc(sizeof(uint8_t), n_elems); + if (!undo_read(bi, buf, n_elems)) { + goto error; + } + extup->data.move = *(ExtmarkMove *)buf; + } else { + goto error; + } + + if (buf) { + xfree(buf); + } + + return extup; + +error: + xfree(extup); + if (buf) { + xfree(buf); + } + *error = true; + return NULL; +} + /// Serializes "uep". /// /// @param bi The buffer information diff --git a/test/functional/lua/buffer_updates_spec.lua b/test/functional/lua/buffer_updates_spec.lua index 8c5e936906..7a6b5be8bc 100644 --- a/test/functional/lua/buffer_updates_spec.lua +++ b/test/functional/lua/buffer_updates_spec.lua @@ -666,8 +666,62 @@ describe('lua: nvim_buf_attach on_bytes', function() } end) + it("sends events when undoing with undofile", function() + write_file("Xtest-undofile", dedent([[ + 12345 + hello world + ]])) + + command("e! Xtest-undofile") + command("set undodir=. | set undofile") + + local ns = helpers.request('nvim_create_namespace', "ns1") + meths.buf_set_extmark(0, ns, 0, 0, {}) + + eq({"12345", "hello world"}, meths.buf_get_lines(0, 0, -1, true)) + + -- splice + feed("gg0d2l") + + eq({"345", "hello world"}, meths.buf_get_lines(0, 0, -1, true)) + + -- move + command(".m+1") + + eq({"hello world", "345"}, meths.buf_get_lines(0, 0, -1, true)) + + -- reload undofile and undo changes + command("w") + command("set noundofile") + command("bw!") + command("e! Xtest-undofile") + + command("set undofile") + + local check_events = setup_eventcheck(verify, nil) + + feed("u") + eq({"345", "hello world"}, meths.buf_get_lines(0, 0, -1, true)) + + check_events { + { "test1", "bytes", 2, 6, 1, 0, 12, 1, 0, 4, 0, 0, 0 }, + { "test1", "bytes", 2, 6, 0, 0, 0, 0, 0, 0, 1, 0, 4 } + } + + feed("u") + eq({"12345", "hello world"}, meths.buf_get_lines(0, 0, -1, true)) + + check_events { + { "test1", "bytes", 2, 8, 0, 0, 0, 0, 0, 0, 0, 2, 2 } + } + command("bw!") + end) + + teardown(function() os.remove "Xtest-reload" + os.remove "Xtest-undofile" + os.remove ".Xtest-undofile.un~" end) end diff --git a/test/functional/ui/fold_spec.lua b/test/functional/ui/fold_spec.lua index 6ce8b33a63..d3b1d33956 100644 --- a/test/functional/ui/fold_spec.lua +++ b/test/functional/ui/fold_spec.lua @@ -38,7 +38,9 @@ describe("folded lines", function() [6] = {background = Screen.colors.Yellow}, [7] = {foreground = Screen.colors.DarkBlue, background = Screen.colors.WebGray}, [8] = {foreground = Screen.colors.Brown }, - [9] = {bold = true, foreground = Screen.colors.Brown} + [9] = {bold = true, foreground = Screen.colors.Brown}, + [10] = {background = Screen.colors.LightGrey, underline = true}, + [11] = {bold=true}, }) end) @@ -290,6 +292,369 @@ describe("folded lines", function() end end) + it("works with split", function() + insert([[ + aa + bb + cc + dd + ee + ff]]) + feed_command('2') + command("set foldcolumn=1") + feed('zf3j') + feed_command('1') + feed('zf2j') + feed('zO') + feed_command("rightbelow new") + insert([[ + aa + bb + cc + dd + ee + ff]]) + feed_command('2') + command("set foldcolumn=1") + feed('zf3j') + feed_command('1') + feed('zf2j') + if multigrid then + meths.input_mouse('left', 'press', '', 4, 0, 0) + screen:expect([[ + ## grid 1 + [2:---------------------------------------------]| + [2:---------------------------------------------]| + {2:[No Name] [+] }| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + {3:[No Name] [+] }| + [3:---------------------------------------------]| + ## grid 2 + {7:-}aa | + {7:-}bb | + ## grid 3 + :1 | + ## grid 4 + {7:-}^aa | + {7:+}{5:+--- 4 lines: bb···························}| + {7:│}ff | + ]]) + else + meths.input_mouse('left', 'press', '', 0, 3, 0) + screen:expect([[ + {7:-}aa | + {7:-}bb | + {2:[No Name] [+] }| + {7:-}^aa | + {7:+}{5:+--- 4 lines: bb···························}| + {7:│}ff | + {3:[No Name] [+] }| + :1 | + ]]) + end + + if multigrid then + meths.input_mouse('left', 'press', '', 4, 1, 0) + screen:expect([[ + ## grid 1 + [2:---------------------------------------------]| + [2:---------------------------------------------]| + {2:[No Name] [+] }| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + {3:[No Name] [+] }| + [3:---------------------------------------------]| + ## grid 2 + {7:-}aa | + {7:-}bb | + ## grid 3 + :1 | + ## grid 4 + {7:-}^aa | + {7:-}bb | + {7:2}cc | + ]]) + else + meths.input_mouse('left', 'press', '', 0, 4, 0) + screen:expect([[ + {7:-}aa | + {7:-}bb | + {2:[No Name] [+] }| + {7:-}^aa | + {7:-}bb | + {7:2}cc | + {3:[No Name] [+] }| + :1 | + ]]) + end + + if multigrid then + meths.input_mouse('left', 'press', '', 2, 1, 0) + screen:expect([[ + ## grid 1 + [2:---------------------------------------------]| + [2:---------------------------------------------]| + {3:[No Name] [+] }| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + {2:[No Name] [+] }| + [3:---------------------------------------------]| + ## grid 2 + {7:-}aa | + {7:+}{5:^+--- 4 lines: bb···························}| + ## grid 3 + :1 | + ## grid 4 + {7:-}aa | + {7:-}bb | + {7:2}cc | + ]]) + else + meths.input_mouse('left', 'press', '', 0, 1, 0) + screen:expect([[ + {7:-}aa | + {7:+}{5:^+--- 4 lines: bb···························}| + {3:[No Name] [+] }| + {7:-}aa | + {7:-}bb | + {7:2}cc | + {2:[No Name] [+] }| + :1 | + ]]) + end + + if multigrid then + meths.input_mouse('left', 'press', '', 2, 0, 0) + screen:expect([[ + ## grid 1 + [2:---------------------------------------------]| + [2:---------------------------------------------]| + {3:[No Name] [+] }| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + {2:[No Name] [+] }| + [3:---------------------------------------------]| + ## grid 2 + {7:+}{5:^+-- 6 lines: aa····························}| + {1:~ }| + ## grid 3 + :1 | + ## grid 4 + {7:-}aa | + {7:-}bb | + {7:2}cc | + ]]) + else + meths.input_mouse('left', 'press', '', 0, 0, 0) + screen:expect([[ + {7:+}{5:^+-- 6 lines: aa····························}| + {1:~ }| + {3:[No Name] [+] }| + {7:-}aa | + {7:-}bb | + {7:2}cc | + {2:[No Name] [+] }| + :1 | + ]]) + end + end) + + it("works with tab", function() + insert([[ + aa + bb + cc + dd + ee + ff]]) + feed_command('2') + command("set foldcolumn=2") + feed('zf3j') + feed_command('1') + feed('zf2j') + feed('zO') + feed_command("tab split") + if multigrid then + meths.input_mouse('left', 'press', '', 4, 1, 1) + screen:expect([[ + ## grid 1 + {10: + [No Name] }{11: + [No Name] }{2: }{10:X}| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [3:---------------------------------------------]| + ## grid 2 (hidden) + {7:- }aa | + {7:│-}bb | + {7:││}cc | + {7:││}dd | + {7:││}ee | + {7:│ }ff | + {1:~ }| + ## grid 3 + :tab split | + ## grid 4 + {7:- }^aa | + {7:│+}{5:+--- 4 lines: bb··························}| + {7:│ }ff | + {1:~ }| + {1:~ }| + {1:~ }| + ]]) + else + meths.input_mouse('left', 'press', '', 0, 2, 1) + screen:expect([[ + {10: + [No Name] }{11: + [No Name] }{2: }{10:X}| + {7:- }^aa | + {7:│+}{5:+--- 4 lines: bb··························}| + {7:│ }ff | + {1:~ }| + {1:~ }| + {1:~ }| + :tab split | + ]]) + end + + if multigrid then + meths.input_mouse('left', 'press', '', 4, 0, 0) + screen:expect([[ + ## grid 1 + {10: + [No Name] }{11: + [No Name] }{2: }{10:X}| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [4:---------------------------------------------]| + [3:---------------------------------------------]| + ## grid 2 (hidden) + {7:- }aa | + {7:│-}bb | + {7:││}cc | + {7:││}dd | + {7:││}ee | + {7:│ }ff | + {1:~ }| + ## grid 3 + :tab split | + ## grid 4 + {7:+ }{5:^+-- 6 lines: aa···························}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ]]) + else + meths.input_mouse('left', 'press', '', 0, 1, 0) + screen:expect([[ + {10: + [No Name] }{11: + [No Name] }{2: }{10:X}| + {7:+ }{5:^+-- 6 lines: aa···························}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + :tab split | + ]]) + end + + feed_command("tabnext") + if multigrid then + meths.input_mouse('left', 'press', '', 2, 1, 1) + screen:expect([[ + ## grid 1 + {11: + [No Name] }{10: + [No Name] }{2: }{10:X}| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [3:---------------------------------------------]| + ## grid 2 + {7:- }^aa | + {7:│+}{5:+--- 4 lines: bb··························}| + {7:│ }ff | + {1:~ }| + {1:~ }| + {1:~ }| + ## grid 3 + :tabnext | + ## grid 4 (hidden) + {7:+ }{5:+-- 6 lines: aa···························}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ]]) + else + meths.input_mouse('left', 'press', '', 0, 2, 1) + screen:expect([[ + {11: + [No Name] }{10: + [No Name] }{2: }{10:X}| + {7:- }^aa | + {7:│+}{5:+--- 4 lines: bb··························}| + {7:│ }ff | + {1:~ }| + {1:~ }| + {1:~ }| + :tabnext | + ]]) + end + + if multigrid then + meths.input_mouse('left', 'press', '', 2, 0, 0) + screen:expect([[ + ## grid 1 + {11: + [No Name] }{10: + [No Name] }{2: }{10:X}| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [2:---------------------------------------------]| + [3:---------------------------------------------]| + ## grid 2 + {7:+ }{5:^+-- 6 lines: aa···························}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ## grid 3 + :tabnext | + ## grid 4 (hidden) + {7:+ }{5:+-- 6 lines: aa···························}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + ]]) + else + meths.input_mouse('left', 'press', '', 0, 1, 0) + screen:expect([[ + {11: + [No Name] }{10: + [No Name] }{2: }{10:X}| + {7:+ }{5:^+-- 6 lines: aa···························}| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + :tabnext | + ]]) + end + end) + it("works with multibyte text", function() -- Currently the only allowed value of 'maxcombine' eq(6, meths.get_option('maxcombine')) |