mirror of
https://github.com/neovim/neovim.git
synced 2025-09-29 14:38:32 +00:00
fix(ui): inccomand performance degradation
It was broken since the introduction of the macro.
This commit is contained in:
@@ -4313,18 +4313,22 @@ skip:
|
|||||||
|
|
||||||
#define PUSH_PREVIEW_LINES() \
|
#define PUSH_PREVIEW_LINES() \
|
||||||
do { \
|
do { \
|
||||||
linenr_T match_lines = current_match.end.lnum \
|
if (preview) { \
|
||||||
- current_match.start.lnum +1; \
|
linenr_T match_lines = current_match.end.lnum \
|
||||||
if (preview_lines.subresults.size > 0) { \
|
- current_match.start.lnum +1; \
|
||||||
linenr_T last = kv_last(preview_lines.subresults).end.lnum; \
|
if (preview_lines.subresults.size > 0) { \
|
||||||
if (last == current_match.start.lnum) { \
|
linenr_T last = kv_last(preview_lines.subresults).end.lnum; \
|
||||||
preview_lines.lines_needed += match_lines - 1; \
|
if (last == current_match.start.lnum) { \
|
||||||
|
preview_lines.lines_needed += match_lines - 1; \
|
||||||
|
} else { \
|
||||||
|
preview_lines.lines_needed += match_lines; \
|
||||||
|
} \
|
||||||
|
} else { \
|
||||||
|
preview_lines.lines_needed += match_lines; \
|
||||||
} \
|
} \
|
||||||
} else { \
|
kv_push(preview_lines.subresults, current_match); \
|
||||||
preview_lines.lines_needed += match_lines; \
|
|
||||||
} \
|
} \
|
||||||
kv_push(preview_lines.subresults, current_match); \
|
} while (0)
|
||||||
} while (0)
|
|
||||||
|
|
||||||
// Push the match to preview_lines.
|
// Push the match to preview_lines.
|
||||||
PUSH_PREVIEW_LINES();
|
PUSH_PREVIEW_LINES();
|
||||||
|
@@ -4,6 +4,7 @@ local clear, feed = helpers.clear, helpers.feed
|
|||||||
local source = helpers.source
|
local source = helpers.source
|
||||||
local command = helpers.command
|
local command = helpers.command
|
||||||
local assert_alive = helpers.assert_alive
|
local assert_alive = helpers.assert_alive
|
||||||
|
local uname = helpers.uname
|
||||||
|
|
||||||
local function new_screen(opt)
|
local function new_screen(opt)
|
||||||
local screen = Screen.new(25, 5)
|
local screen = Screen.new(25, 5)
|
||||||
@@ -824,7 +825,7 @@ describe('cmdline redraw', function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
it('with <Cmd>', function()
|
it('with <Cmd>', function()
|
||||||
if 'openbsd' == helpers.uname() then
|
if string.find(uname(), 'bsd') then
|
||||||
pending('FIXME #10804')
|
pending('FIXME #10804')
|
||||||
end
|
end
|
||||||
command('cmap a <Cmd>call sin(0)<CR>') -- no-op
|
command('cmap a <Cmd>call sin(0)<CR>') -- no-op
|
||||||
|
Reference in New Issue
Block a user