From 619838f85da24d692221ba7cc310d6839ebbe2a5 Mon Sep 17 00:00:00 2001 From: KillTheMule Date: Mon, 3 Jul 2017 09:36:43 +0200 Subject: inccommand: improve performance #6949 During a preview, we can stop looking for matches after we got enough lines for the preview buffer. Because of this perf improvement, the 'redrawtime' test needs to be slowed down in a different way: _long_ lines instead of just many lines. --- src/nvim/ex_cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/ex_cmds.c') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 8dcb3ac449..b550e9a9c6 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -3332,7 +3332,8 @@ static buf_T *do_sub(exarg_T *eap, proftime_T timeout) // Check for a match on each line. linenr_T line2 = eap->line2; for (linenr_T lnum = eap->line1; - lnum <= line2 && !(got_quit || aborting()); + lnum <= line2 && !(got_quit || aborting()) + && (!preview || matched_lines.size <= (size_t)p_cwh); lnum++) { long nmatch = vim_regexec_multi(®match, curwin, curbuf, lnum, (colnr_T)0, NULL); -- cgit From c805f2cf54aa4ab066bb9e7f3d5b7cc40d04004e Mon Sep 17 00:00:00 2001 From: ckelsel Date: Mon, 10 Jul 2017 08:55:54 +0800 Subject: vim-patch:7.4.2250 Problem: Some error message cannot be translated. Solution: Enclose them in _() and N_(). (Dominique Pelle) https://github.com/vim/vim/commit/5b30291785e6b9be1a607504c14bd03c601b59a6 --- src/nvim/ex_cmds.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/nvim/ex_cmds.c') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index b550e9a9c6..a534a476df 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -5024,7 +5024,7 @@ static void helptags_one(char_u *dir, char_u *ext, char_u *tagfname, EW_FILE|EW_SILENT) == FAIL || filecount == 0) { if (!got_int) - EMSG2("E151: No match: %s", NameBuff); + EMSG2(_("E151: No match: %s"), NameBuff); return; } @@ -5223,7 +5223,7 @@ static void do_helptags(char_u *dirname, bool add_help_tags) if (gen_expand_wildcards(1, buff_list, &filecount, &files, EW_FILE|EW_SILENT) == FAIL || filecount == 0) { - EMSG2("E151: No match: %s", NameBuff); + EMSG2(_("E151: No match: %s"), NameBuff); xfree(dirname); return; } -- cgit From 06f4b963222efd2a986e79b7390b50d6e42941be Mon Sep 17 00:00:00 2001 From: ckelsel Date: Tue, 11 Jul 2017 08:27:05 +0800 Subject: lint --- src/nvim/ex_cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/nvim/ex_cmds.c') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index a534a476df..0987cb3915 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -5023,8 +5023,9 @@ static void helptags_one(char_u *dir, char_u *ext, char_u *tagfname, if (gen_expand_wildcards(1, buff_list, &filecount, &files, EW_FILE|EW_SILENT) == FAIL || filecount == 0) { - if (!got_int) + if (!got_int) { EMSG2(_("E151: No match: %s"), NameBuff); + } return; } -- cgit