!145 [sync] PR-141: add make check
From: @openeuler-sync-bot Reviewed-by: @xiezhipeng1 Signed-off-by: @xiezhipeng1
This commit is contained in:
commit
1b5b68152c
@ -7,8 +7,7 @@ Problem: ml_get error after search with range.
|
||||
Solution: Limit the line number to the buffer line count.
|
||||
---
|
||||
src/ex_docmd.c | 6 ++++--
|
||||
src/testdir/test_search.vim | 14 ++++++++++++++
|
||||
2 files changed, 18 insertions(+), 2 deletions(-)
|
||||
1 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/ex_docmd.c b/src/ex_docmd.c
|
||||
index 76daf43..12554fa 100644
|
||||
@ -27,28 +26,6 @@ index 76daf43..12554fa 100644
|
||||
|
||||
// Start a forward search at the end of the line (unless
|
||||
// before the first line).
|
||||
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
|
||||
index 1876713..ac0881c 100644
|
||||
--- a/src/testdir/test_search.vim
|
||||
+++ b/src/testdir/test_search.vim
|
||||
@@ -1366,3 +1366,17 @@ func Test_searchdecl()
|
||||
|
||||
bwipe!
|
||||
endfunc
|
||||
+
|
||||
+func Test_search_with_invalid_range()
|
||||
+ new
|
||||
+ let lines =<< trim END
|
||||
+ /\%.v
|
||||
+ 5/
|
||||
+ c
|
||||
+ END
|
||||
+ call writefile(lines, 'Xrangesearch')
|
||||
+ source Xrangesearch
|
||||
+
|
||||
+ bwipe!
|
||||
+ call delete('Xrangesearch')
|
||||
+endfunc
|
||||
--
|
||||
2.27.0
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ index ec566da..32a5411 100644
|
||||
+
|
||||
+func Test_deep_recursion()
|
||||
+ " this was running out of stack
|
||||
+ call assert_fails("exe 'if ' .. repeat('(', 1002)", 'E1169: Expression too recursive: ((')+endfunc
|
||||
+ call assert_fails("exe 'if ' .. repeat('(', 1002)", 'E1169: Expression too recursive: ((')
|
||||
+endfunc
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
26
backport-block-insert-with-double-wide-character-fails.patch
Normal file
26
backport-block-insert-with-double-wide-character-fails.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From fc6ccebea668c49e9e617e0657421b6a8ed9df1e Mon Sep 17 00:00:00 2001
|
||||
From: Bram Moolenaar <Bram@vim.org>
|
||||
Date: Thu, 20 Jan 2022 12:22:35 +0000
|
||||
Subject: [PATCH] patch 8.2.4152: block insert with double wide character fails
|
||||
Problem: Block insert with double wide character fails.
|
||||
Solution: Adjust the expected output.
|
||||
Reference:https://github.com/vim/vim/commit/fc6ccebea668c49e9e617e0657421b6a8ed9df1e
|
||||
Conflict:Conflict:The src/version.c file is not modified.
|
||||
---
|
||||
src/testdir/test_utf8.vim | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
diff --git a/src/testdir/test_utf8.vim b/src/testdir/test_utf8.vim
|
||||
index 42a46fd..32cec0f 100644
|
||||
--- a/src/testdir/test_utf8.vim
|
||||
+++ b/src/testdir/test_utf8.vim
|
||||
@@ -7,7 +7,7 @@ func Test_visual_block_insert()
|
||||
new
|
||||
call setline(1, ["aaa", "あああ", "bbb"])
|
||||
exe ":norm! gg0l\<C-V>jjIx\<Esc>"
|
||||
- call assert_equal(['axaa', 'xあああ', 'bxbb'], getline(1, '$'))
|
||||
+ call assert_equal(['axaa', ' xあああ', 'bxbb'], getline(1, '$'))
|
||||
bwipeout!
|
||||
endfunc
|
||||
|
||||
--
|
||||
2.27.0
|
||||
@ -0,0 +1,42 @@
|
||||
From fe4bbac1166f2e4e3fa18cb966ec7305198c8176 Mon Sep 17 00:00:00 2001
|
||||
From: Bram Moolenaar <Bram@vim.org>
|
||||
Date: Mon, 20 Jan 2020 21:12:20 +0100
|
||||
Subject: [PATCH] patch 8.2.0135: bracketed paste can still cause invalid
|
||||
memory access
|
||||
Problem: Bracketed paste can still cause invalid memory access. (Dominique
|
||||
Pelle)
|
||||
Solution: Check for NULL pointer.
|
||||
Reference:https://github.com/vim/vim/commit/fe4bbac1166f2e4e3fa18cb966ec7305198c8176
|
||||
Conflict:The src/version.c file is not modified.
|
||||
---
|
||||
src/edit.c | 2 +-
|
||||
src/testdir/test_search.vim | 3 ++-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
diff --git a/src/edit.c b/src/edit.c
|
||||
index f822a79..1b7d368 100644
|
||||
--- a/src/edit.c
|
||||
+++ b/src/edit.c
|
||||
@@ -4942,7 +4942,7 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
|
||||
int save_paste = p_paste;
|
||||
|
||||
// If the end code is too long we can't detect it, read everything.
|
||||
- if (STRLEN(end) >= NUMBUFLEN)
|
||||
+ if (end != NULL && STRLEN(end) >= NUMBUFLEN)
|
||||
end = NULL;
|
||||
++no_mapping;
|
||||
allow_keys = 0;
|
||||
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
|
||||
index c8020eb..4bf0b2d 100644
|
||||
--- a/src/testdir/test_search.vim
|
||||
+++ b/src/testdir/test_search.vim
|
||||
@@ -1368,6 +1368,7 @@ func Test_searchdecl()
|
||||
endfunc
|
||||
|
||||
func Test_search_special()
|
||||
- " this was causing illegal memory access
|
||||
+ " this was causing illegal memory access and an endless loop
|
||||
+ set t_PE=
|
||||
exe "norm /\x80PS"
|
||||
endfunc
|
||||
--
|
||||
2.27.0
|
||||
260
backport-cannot-use-z-when-spell-is-off.patch
Normal file
260
backport-cannot-use-z-when-spell-is-off.patch
Normal file
@ -0,0 +1,260 @@
|
||||
From 152e79e94bb935e75b866bd55479648cde11066a Mon Sep 17 00:00:00 2001
|
||||
From: Bram Moolenaar <Bram@vim.org>
|
||||
Date: Wed, 10 Jun 2020 15:32:08 +0200
|
||||
Subject: [PATCH] patch 8.2.0945: cannot use "z=" when 'spell' is off
|
||||
|
||||
Reference:https://github.com/vim/vim/commit/152e79e94bb935e75b866bd55479648cde11066a
|
||||
Conflict:The software package does not contain the Test_spellsuggest function.
|
||||
|
||||
Problem: Cannot use "z=" when 'spell' is off.
|
||||
Solution: Make "z=" work even when 'spell' is off. (Christian Brabandt,
|
||||
Gary Johnson, closes #6227)
|
||||
---
|
||||
runtime/doc/eval.txt | 8 +++----
|
||||
src/evalfunc.c | 46 ++++++++++++++++++++++++++++++++++++--
|
||||
src/globals.h | 3 +++
|
||||
src/spell.c | 2 +-
|
||||
src/spellsuggest.c | 13 ++++++++++-
|
||||
src/testdir/test_spell.vim | 37 +++++++++++++++++++++++++++---
|
||||
6 files changed, 97 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt
|
||||
index b28fac9..1aeb193 100644
|
||||
--- a/runtime/doc/eval.txt
|
||||
+++ b/runtime/doc/eval.txt
|
||||
@@ -9071,9 +9071,8 @@ spellbadword([{sentence}])
|
||||
echo spellbadword("the quik brown fox")
|
||||
< ['quik', 'bad'] ~
|
||||
|
||||
- The spelling information for the current window is used. The
|
||||
- 'spell' option must be set and the value of 'spelllang' is
|
||||
- used.
|
||||
+ The spelling information for the current window and the value
|
||||
+ of 'spelllang' are used.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetText()->spellbadword()
|
||||
@@ -9098,8 +9097,7 @@ spellsuggest({word} [, {max} [, {capital}]])
|
||||
although it may appear capitalized.
|
||||
|
||||
The spelling information for the current window is used. The
|
||||
- 'spell' option must be set and the values of 'spelllang' and
|
||||
- 'spellsuggest' are used.
|
||||
+ values of 'spelllang' and 'spellsuggest' are used.
|
||||
|
||||
Can also be used as a |method|: >
|
||||
GetWord()->spellsuggest()
|
||||
diff --git a/src/evalfunc.c b/src/evalfunc.c
|
||||
index 892a753..24bd7b1 100644
|
||||
--- a/src/evalfunc.c
|
||||
+++ b/src/evalfunc.c
|
||||
@@ -6903,9 +6903,30 @@ f_spellbadword(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
char_u *word = (char_u *)"";
|
||||
hlf_T attr = HLF_COUNT;
|
||||
int len = 0;
|
||||
+#ifdef FEAT_SPELL
|
||||
+ int wo_spell_save = curwin->w_p_spell;
|
||||
+
|
||||
+ if (!curwin->w_p_spell)
|
||||
+ {
|
||||
+ did_set_spelllang(curwin);
|
||||
+ curwin->w_p_spell = TRUE;
|
||||
+ }
|
||||
+
|
||||
+ if (*curwin->w_s->b_p_spl == NUL)
|
||||
+ {
|
||||
+ emsg(_(e_no_spell));
|
||||
+ curwin->w_p_spell = wo_spell_save;
|
||||
+ return;
|
||||
+ }
|
||||
+#endif
|
||||
|
||||
if (rettv_list_alloc(rettv) == FAIL)
|
||||
+ {
|
||||
+#ifdef FEAT_SPELL
|
||||
+ curwin->w_p_spell = wo_spell_save;
|
||||
+#endif
|
||||
return;
|
||||
+ }
|
||||
|
||||
#ifdef FEAT_SPELL
|
||||
if (argvars[0].v_type == VAR_UNKNOWN)
|
||||
@@ -6918,7 +6939,7 @@ f_spellbadword(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
curwin->w_set_curswant = TRUE;
|
||||
}
|
||||
}
|
||||
- else if (curwin->w_p_spell && *curbuf->b_s.b_p_spl != NUL)
|
||||
+ else if (*curbuf->b_s.b_p_spl != NUL)
|
||||
{
|
||||
char_u *str = tv_get_string_chk(&argvars[0]);
|
||||
int capcol = -1;
|
||||
@@ -6940,6 +6961,7 @@ f_spellbadword(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
}
|
||||
}
|
||||
}
|
||||
+ curwin->w_p_spell = wo_spell_save;
|
||||
#endif
|
||||
|
||||
list_append_string(rettv->vval.v_list, word, len);
|
||||
@@ -6965,13 +6987,32 @@ f_spellsuggest(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
int i;
|
||||
listitem_T *li;
|
||||
int need_capital = FALSE;
|
||||
+ int wo_spell_save = curwin->w_p_spell;
|
||||
+
|
||||
+ if (!curwin->w_p_spell)
|
||||
+ {
|
||||
+ did_set_spelllang(curwin);
|
||||
+ curwin->w_p_spell = TRUE;
|
||||
+ }
|
||||
+
|
||||
+ if (*curwin->w_s->b_p_spl == NUL)
|
||||
+ {
|
||||
+ emsg(_(e_no_spell));
|
||||
+ curwin->w_p_spell = wo_spell_save;
|
||||
+ return;
|
||||
+ }
|
||||
#endif
|
||||
|
||||
if (rettv_list_alloc(rettv) == FAIL)
|
||||
+ {
|
||||
+#ifdef FEAT_SPELL
|
||||
+ curwin->w_p_spell = wo_spell_save;
|
||||
+#endif
|
||||
return;
|
||||
+ }
|
||||
|
||||
#ifdef FEAT_SPELL
|
||||
- if (curwin->w_p_spell && *curwin->w_s->b_p_spl != NUL)
|
||||
+ if (*curwin->w_s->b_p_spl != NUL)
|
||||
{
|
||||
str = tv_get_string(&argvars[0]);
|
||||
if (argvars[1].v_type != VAR_UNKNOWN)
|
||||
@@ -7008,6 +7049,7 @@ f_spellsuggest(typval_T *argvars UNUSED, typval_T *rettv)
|
||||
}
|
||||
ga_clear(&ga);
|
||||
}
|
||||
+ curwin->w_p_spell = wo_spell_save;
|
||||
#endif
|
||||
}
|
||||
|
||||
diff --git a/src/globals.h b/src/globals.h
|
||||
index 77a42d8..bdda224 100644
|
||||
--- a/src/globals.h
|
||||
+++ b/src/globals.h
|
||||
@@ -1492,6 +1492,9 @@ EXTERN char e_invcmd[] INIT(= N_("E476: Invalid command"));
|
||||
#if defined(UNIX) || defined(FEAT_SYN_HL) || defined(FEAT_SPELL)
|
||||
EXTERN char e_isadir2[] INIT(= N_("E17: \"%s\" is a directory"));
|
||||
#endif
|
||||
+#ifdef FEAT_SPELL
|
||||
+EXTERN char e_no_spell[] INIT(= N_("E756: Spell checking is not possible"));
|
||||
+#endif
|
||||
#ifdef FEAT_LIBCALL
|
||||
EXTERN char e_libcall[] INIT(= N_("E364: Library call failed for \"%s()\""));
|
||||
#endif
|
||||
diff --git a/src/spell.c b/src/spell.c
|
||||
index 572f7fb..d8310fa 100644
|
||||
--- a/src/spell.c
|
||||
+++ b/src/spell.c
|
||||
@@ -1225,7 +1225,7 @@ no_spell_checking(win_T *wp)
|
||||
if (!wp->w_p_spell || *wp->w_s->b_p_spl == NUL
|
||||
|| wp->w_s->b_langp.ga_len == 0)
|
||||
{
|
||||
- emsg(_("E756: Spell checking is not enabled"));
|
||||
+ emsg(_(e_no_spell));
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
diff --git a/src/spellsuggest.c b/src/spellsuggest.c
|
||||
index 9d6df79..06e0ad1 100644
|
||||
--- a/src/spellsuggest.c
|
||||
+++ b/src/spellsuggest.c
|
||||
@@ -471,9 +471,19 @@ spell_suggest(int count)
|
||||
int selected = count;
|
||||
int badlen = 0;
|
||||
int msg_scroll_save = msg_scroll;
|
||||
+ int wo_spell_save = curwin->w_p_spell;
|
||||
|
||||
- if (no_spell_checking(curwin))
|
||||
+ if (!curwin->w_p_spell)
|
||||
+ {
|
||||
+ did_set_spelllang(curwin);
|
||||
+ curwin->w_p_spell = TRUE;
|
||||
+ }
|
||||
+
|
||||
+ if (*curwin->w_s->b_p_spl == NUL)
|
||||
+ {
|
||||
+ emsg(_(e_no_spell));
|
||||
return;
|
||||
+ }
|
||||
|
||||
if (VIsual_active)
|
||||
{
|
||||
@@ -687,6 +697,7 @@ spell_suggest(int count)
|
||||
spell_find_cleanup(&sug);
|
||||
skip:
|
||||
vim_free(line);
|
||||
+ curwin->w_p_spell = wo_spell_save;
|
||||
}
|
||||
|
||||
/*
|
||||
diff --git a/src/testdir/test_spell.vim b/src/testdir/test_spell.vim
|
||||
index 79fb892..f10ec61 100644
|
||||
--- a/src/testdir/test_spell.vim
|
||||
+++ b/src/testdir/test_spell.vim
|
||||
@@ -99,11 +99,14 @@ foobar/?
|
||||
set spelllang=Xwords.spl
|
||||
call assert_equal(['foobar', 'rare'], spellbadword('foo foobar'))
|
||||
|
||||
- " Typo should not be detected without the 'spell' option.
|
||||
+ " Typo should be detected even without the 'spell' option.
|
||||
set spelllang=en_gb nospell
|
||||
call assert_equal(['', ''], spellbadword('centre'))
|
||||
- call assert_equal(['', ''], spellbadword('My bycycle.'))
|
||||
- call assert_equal(['', ''], spellbadword('A sentence. another sentence'))
|
||||
+ call assert_equal(['bycycle', 'bad'], spellbadword('My bycycle.'))
|
||||
+ call assert_equal(['another', 'caps'], spellbadword('A sentence. another sentence'))
|
||||
+
|
||||
+ set spelllang=
|
||||
+ call assert_fails("call spellbadword('maxch')", 'E756:')
|
||||
|
||||
call delete('Xwords.spl')
|
||||
call delete('Xwords')
|
||||
@@ -415,6 +418,34 @@ func Test_zeq_crash()
|
||||
bwipe!
|
||||
endfunc
|
||||
|
||||
+" Check that z= works even when 'nospell' is set. This test uses one of the
|
||||
+" tests in Test_spellsuggest_option_number() just to verify that z= basically
|
||||
+" works and that "E756: Spell checking is not enabled" is not generated.
|
||||
+func Test_zeq_nospell()
|
||||
+ new
|
||||
+ set nospell spellsuggest=1,best
|
||||
+ call setline(1, 'A baord')
|
||||
+ try
|
||||
+ norm $1z=
|
||||
+ call assert_equal('A board', getline(1))
|
||||
+ catch
|
||||
+ call assert_report("Caught exception: " . v:exception)
|
||||
+ endtry
|
||||
+ set spell& spellsuggest&
|
||||
+ bwipe!
|
||||
+endfunc
|
||||
+
|
||||
+" Check that "E756: Spell checking is not possible" is reported when z= is
|
||||
+" executed and 'spelllang' is empty.
|
||||
+func Test_zeq_no_spelllang()
|
||||
+ new
|
||||
+ set spelllang= spellsuggest=1,best
|
||||
+ call setline(1, 'A baord')
|
||||
+ call assert_fails('normal $1z=', 'E756:')
|
||||
+ set spelllang& spellsuggest&
|
||||
+ bwipe!
|
||||
+endfunc
|
||||
+
|
||||
" Check handling a word longer than MAXWLEN.
|
||||
func Test_spell_long_word()
|
||||
set enc=utf-8
|
||||
--
|
||||
2.27.0
|
||||
|
||||
101
backport-command-line-editing-not-sufficiently-tested.patch
Normal file
101
backport-command-line-editing-not-sufficiently-tested.patch
Normal file
@ -0,0 +1,101 @@
|
||||
From 59cb041d0a56d8555857da7e063ec61504ee1fa7 Mon Sep 17 00:00:00 2001
|
||||
From: Bram Moolenaar <Bram@vim.org>
|
||||
Date: Wed, 18 Dec 2019 22:26:31 +0100
|
||||
Subject: [PATCH] patch 8.2.0023: command line editing not sufficiently tested
|
||||
Problem: Command line editing not sufficiently tested.
|
||||
Solution: Add more tests. (Dominique Pelle, closes #5374)
|
||||
Reference:https://github.com/vim/vim/commit/59cb041d0a56d8555857da7e063ec61504ee1fa7
|
||||
Conflict:don't change src/testdir/test_cmdline.vim file. isrc/testdir/test_ex_mode.vim file
|
||||
needs to be introduced to fix the CVE-2022-0359,so only change src/testdir/test_ex_mode.vim
|
||||
---
|
||||
src/testdir/Make_all.mak | 1 +
|
||||
src/testdir/test_alot.vim | 1 +
|
||||
src/testdir/test_ex_mode.vim | 54 ++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 56 insertions(+)
|
||||
create mode 100644 src/testdir/test_ex_mode.vim
|
||||
diff --git a/src/testdir/Make_all.mak b/src/testdir/Make_all.mak
|
||||
index 665bcc7..05e7a2c 100644
|
||||
--- a/src/testdir/Make_all.mak
|
||||
+++ b/src/testdir/Make_all.mak
|
||||
@@ -102,6 +102,7 @@ NEW_TESTS = \
|
||||
test_ex_equal \
|
||||
test_ex_undo \
|
||||
test_ex_z \
|
||||
+ test_ex_mode \
|
||||
test_excmd \
|
||||
test_exec_while_if \
|
||||
test_execute_func \
|
||||
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim
|
||||
index 894ec58..25241b2 100644
|
||||
--- a/src/testdir/test_alot.vim
|
||||
+++ b/src/testdir/test_alot.vim
|
||||
@@ -13,6 +13,7 @@ source test_delete.vim
|
||||
source test_ex_equal.vim
|
||||
source test_ex_undo.vim
|
||||
source test_ex_z.vim
|
||||
+source test_ex_mode.vim
|
||||
source test_execute_func.vim
|
||||
source test_expand.vim
|
||||
source test_expand_dllpath.vim
|
||||
diff --git a/src/testdir/test_ex_mode.vim b/src/testdir/test_ex_mode.vim
|
||||
new file mode 100644
|
||||
index 0000000..00a35a3
|
||||
--- /dev/null
|
||||
+++ b/src/testdir/test_ex_mode.vim
|
||||
@@ -0,0 +1,54 @@
|
||||
+" Test editing line in Ex mode (see :help Q and :help gQ).
|
||||
+
|
||||
+" Helper function to test editing line in Q Ex mode
|
||||
+func Ex_Q(cmd)
|
||||
+ " Is there a simpler way to test editing Ex line?
|
||||
+ call feedkeys("Q"
|
||||
+ \ .. "let s:test_ex =<< END\<CR>"
|
||||
+ \ .. a:cmd .. "\<CR>"
|
||||
+ \ .. "END\<CR>"
|
||||
+ \ .. "visual\<CR>", 'tx')
|
||||
+ return s:test_ex[0]
|
||||
+endfunc
|
||||
+
|
||||
+" Helper function to test editing line in gQ Ex mode
|
||||
+func Ex_gQ(cmd)
|
||||
+ call feedkeys("gQ" .. a:cmd .. "\<C-b>\"\<CR>", 'tx')
|
||||
+ let ret = @:[1:] " Remove leading quote.
|
||||
+ call feedkeys("visual\<CR>", 'tx')
|
||||
+ return ret
|
||||
+endfunc
|
||||
+
|
||||
+" Helper function to test editing line with both Q and gQ Ex mode.
|
||||
+func Ex(cmd)
|
||||
+ return [Ex_Q(a:cmd), Ex_gQ(a:cmd)]
|
||||
+endfunc
|
||||
+
|
||||
+" Test editing line in Ex mode (both Q and gQ)
|
||||
+func Test_ex_mode()
|
||||
+ let encoding_save = &encoding
|
||||
+ set sw=2
|
||||
+
|
||||
+ for e in ['utf8', 'latin1']
|
||||
+ exe 'set encoding=' . e
|
||||
+
|
||||
+ call assert_equal(['bar', 'bar'], Ex("foo bar\<C-u>bar"), e)
|
||||
+ call assert_equal(["1\<C-u>2", "1\<C-u>2"], Ex("1\<C-v>\<C-u>2"), e)
|
||||
+ call assert_equal(["1\<C-b>2\<C-e>3", '213'], Ex("1\<C-b>2\<C-e>3"), e)
|
||||
+ call assert_equal(['0123', '2013'], Ex("01\<Home>2\<End>3"), e)
|
||||
+ call assert_equal(['0123', '0213'], Ex("01\<Left>2\<Right>3"), e)
|
||||
+ call assert_equal(['01234', '0342'], Ex("012\<Left>\<Left>\<Insert>3\<Insert>4"), e)
|
||||
+ call assert_equal(["foo bar\<C-w>", 'foo '], Ex("foo bar\<C-w>"), e)
|
||||
+ call assert_equal(['foo', 'foo'], Ex("fooba\<Del>\<Del>"), e)
|
||||
+ call assert_equal(["foo\tbar", 'foobar'], Ex("foo\<Tab>bar"), e)
|
||||
+ call assert_equal(["abbrev\t", 'abbreviate'], Ex("abbrev\<Tab>"), e)
|
||||
+ call assert_equal([' 1', "1\<C-t>\<C-t>"], Ex("1\<C-t>\<C-t>"), e)
|
||||
+ call assert_equal([' 1', "1\<C-t>\<C-t>"], Ex("1\<C-t>\<C-t>\<C-d>"), e)
|
||||
+ call assert_equal([' foo', ' foo'], Ex(" foo\<C-d>"), e)
|
||||
+ call assert_equal(['foo', ' foo0'], Ex(" foo0\<C-d>"), e)
|
||||
+ call assert_equal(['foo', ' foo^'], Ex(" foo^\<C-d>"), e)
|
||||
+ endfor
|
||||
+
|
||||
+ set sw&
|
||||
+ let &encoding = encoding_save
|
||||
+endfunc
|
||||
--
|
||||
2.27.0
|
||||
44
backport-invalid-memory-access-with-search-command.patch
Normal file
44
backport-invalid-memory-access-with-search-command.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From 98a336dd497d3422e7efeef9f24cc9e25aeb8a49 Mon Sep 17 00:00:00 2001
|
||||
From: Bram Moolenaar <Bram@vim.org>
|
||||
Date: Mon, 20 Jan 2020 20:22:30 +0100
|
||||
Subject: [PATCH] patch 8.2.0133: invalid memory access with search command
|
||||
Problem: Invalid memory access with search command.
|
||||
Solution: When :normal runs out of characters in bracketed paste mode break
|
||||
out of the loop.(closes #5511)
|
||||
Reference:https://github.com/vim/vim/commit/98a336dd497d3422e7efeef9f24cc9e25aeb8a49
|
||||
Conflict:The src/version.c file is not modified.
|
||||
---
|
||||
src/edit.c | 4 ++--
|
||||
src/testdir/test_search.vim | 5 +++++
|
||||
2 files changed, 7 insertions(+), 2 deletions(-)
|
||||
diff --git a/src/edit.c b/src/edit.c
|
||||
index d2e45dd..f822a79 100644
|
||||
--- a/src/edit.c
|
||||
+++ b/src/edit.c
|
||||
@@ -4959,9 +4959,9 @@ bracketed_paste(paste_mode_T mode, int drop, garray_T *gap)
|
||||
do
|
||||
c = vgetc();
|
||||
while (c == K_IGNORE || c == K_VER_SCROLLBAR || c == K_HOR_SCROLLBAR);
|
||||
- if (c == NUL || got_int)
|
||||
+ if (c == NUL || got_int || (ex_normal_busy > 0 && c == Ctrl_C))
|
||||
// When CTRL-C was encountered the typeahead will be flushed and we
|
||||
- // won't get the end sequence.
|
||||
+ // won't get the end sequence. Except when using ":normal".
|
||||
break;
|
||||
|
||||
if (has_mbyte)
|
||||
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
|
||||
index 1876713..c8020eb 100644
|
||||
--- a/src/testdir/test_search.vim
|
||||
+++ b/src/testdir/test_search.vim
|
||||
@@ -1366,3 +1366,8 @@ func Test_searchdecl()
|
||||
|
||||
bwipe!
|
||||
endfunc
|
||||
+
|
||||
+func Test_search_special()
|
||||
+ " this was causing illegal memory access
|
||||
+ exe "norm /\x80PS"
|
||||
+endfunc
|
||||
--
|
||||
2.27.0
|
||||
779
remove-failed-tests-due-to-patch.patch
Normal file
779
remove-failed-tests-due-to-patch.patch
Normal file
@ -0,0 +1,779 @@
|
||||
From ca7a7ce78d3c12d4c9ed458a7c67866be60aabe8 Mon Sep 17 00:00:00 2001
|
||||
From: wangshouping <wangshouping@huawei.com>
|
||||
Date: Sat, 6 Mar 2021 20:55:26 +0800
|
||||
Subject: [PATCH] remove test cases of failure due to patch
|
||||
|
||||
reason: Remove test cases of failure due to vim-7.4-syntax.patch/
|
||||
vim-8.0-copy-paste.patch/vim-7.4-syncolor.patch.
|
||||
|
||||
Signed-off-by: wangshouping <wangshouping@huawei.com>
|
||||
---
|
||||
src/testdir/test_balloon.vim | 47 ----
|
||||
src/testdir/test_diffmode.vim | 181 ----------------
|
||||
src/testdir/test_filetype.vim | 9 -
|
||||
src/testdir/test_popupwin.vim | 285 -------------------------
|
||||
src/testdir/test_popupwin_textprop.vim | 166 --------------
|
||||
5 files changed, 688 deletions(-)
|
||||
|
||||
diff --git a/src/testdir/test_balloon.vim b/src/testdir/test_balloon.vim
|
||||
index f32b73c..b7d1a15 100644
|
||||
--- a/src/testdir/test_balloon.vim
|
||||
+++ b/src/testdir/test_balloon.vim
|
||||
@@ -17,50 +17,3 @@ let s:common_script =<< trim [CODE]
|
||||
redraw
|
||||
[CODE]
|
||||
|
||||
-func Test_balloon_eval_term()
|
||||
- " Use <Ignore> after <MouseMove> to return from vgetc() without removing
|
||||
- " the balloon.
|
||||
- let xtra_lines =<< trim [CODE]
|
||||
- set updatetime=300
|
||||
- au CursorHold * echo 'hold fired'
|
||||
- func Trigger()
|
||||
- call test_setmouse(2, 6)
|
||||
- call feedkeys("\<MouseMove>\<Ignore>", "xt")
|
||||
- endfunc
|
||||
- [CODE]
|
||||
- call writefile(s:common_script + xtra_lines, 'XTest_beval')
|
||||
-
|
||||
- " Check that the balloon shows up after a mouse move
|
||||
- let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
|
||||
- call term_wait(buf, 100)
|
||||
- call term_sendkeys(buf, 'll')
|
||||
- call term_sendkeys(buf, ":call Trigger()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_balloon_eval_term_01', {})
|
||||
-
|
||||
- " Make sure the balloon still shows after 'updatetime' passed and CursorHold
|
||||
- " was triggered.
|
||||
- call term_wait(buf, 300)
|
||||
- call VerifyScreenDump(buf, 'Test_balloon_eval_term_01a', {})
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('XTest_beval')
|
||||
-endfunc
|
||||
-
|
||||
-func Test_balloon_eval_term_visual()
|
||||
- " Use <Ignore> after <MouseMove> to return from vgetc() without removing
|
||||
- " the balloon.
|
||||
- call writefile(s:common_script + [
|
||||
- \ 'call test_setmouse(3, 6)',
|
||||
- \ 'call feedkeys("3Gevfr\<MouseMove>\<Ignore>", "xt")',
|
||||
- \ ], 'XTest_beval_visual')
|
||||
-
|
||||
- " Check that the balloon shows up after a mouse move
|
||||
- let buf = RunVimInTerminal('-S XTest_beval_visual', {'rows': 10, 'cols': 50})
|
||||
- call term_wait(buf, 100)
|
||||
- call VerifyScreenDump(buf, 'Test_balloon_eval_term_02', {})
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('XTest_beval_visual')
|
||||
-endfunc
|
||||
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
|
||||
index 9dfe2fe..61edbe2 100644
|
||||
--- a/src/testdir/test_diffmode.vim
|
||||
+++ b/src/testdir/test_diffmode.vim
|
||||
@@ -748,163 +748,6 @@ func VerifyInternal(buf, dumpfile, extra)
|
||||
call VerifyScreenDump(a:buf, a:dumpfile, {})
|
||||
endfunc
|
||||
|
||||
-func Test_diff_screen()
|
||||
- CheckScreendump
|
||||
- CheckFeature menu
|
||||
-
|
||||
- " clean up already existing swap files, just in case
|
||||
- call delete('.Xfile1.swp')
|
||||
- call delete('.Xfile2.swp')
|
||||
-
|
||||
- " Test 1: Add a line in beginning of file 2
|
||||
- call WriteDiffFiles(0, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
|
||||
- let buf = RunVimInTerminal('-d Xfile1 Xfile2', {})
|
||||
- " Set autoread mode, so that Vim won't complain once we re-write the test
|
||||
- " files
|
||||
- call term_sendkeys(buf, ":set autoread\<CR>\<c-w>w:set autoread\<CR>\<c-w>w")
|
||||
-
|
||||
- call VerifyBoth(buf, 'Test_diff_01', '')
|
||||
-
|
||||
- " Test 2: Add a line in beginning of file 1
|
||||
- call WriteDiffFiles(buf, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
|
||||
- call VerifyBoth(buf, 'Test_diff_02', '')
|
||||
-
|
||||
- " Test 3: Add a line at the end of file 2
|
||||
- call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
|
||||
- call VerifyBoth(buf, 'Test_diff_03', '')
|
||||
-
|
||||
- " Test 4: Add a line at the end of file 1
|
||||
- call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
|
||||
- call VerifyBoth(buf, 'Test_diff_04', '')
|
||||
-
|
||||
- " Test 5: Add a line in the middle of file 2, remove on at the end of file 1
|
||||
- call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11], [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10])
|
||||
- call VerifyBoth(buf, 'Test_diff_05', '')
|
||||
-
|
||||
- " Test 6: Add a line in the middle of file 1, remove on at the end of file 2
|
||||
- call WriteDiffFiles(buf, [1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11])
|
||||
- call VerifyBoth(buf, 'Test_diff_06', '')
|
||||
-
|
||||
- " Variants on test 6 with different context settings
|
||||
- call term_sendkeys(buf, ":set diffopt+=context:2\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_06.2', {})
|
||||
- call term_sendkeys(buf, ":set diffopt-=context:2\<cr>")
|
||||
- call term_sendkeys(buf, ":set diffopt+=context:1\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_06.1', {})
|
||||
- call term_sendkeys(buf, ":set diffopt-=context:1\<cr>")
|
||||
- call term_sendkeys(buf, ":set diffopt+=context:0\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_06.0', {})
|
||||
- call term_sendkeys(buf, ":set diffopt-=context:0\<cr>")
|
||||
-
|
||||
- " Test 7 - 9: Test normal/patience/histogram diff algorithm
|
||||
- call WriteDiffFiles(buf, ['#include <stdio.h>', '', '// Frobs foo heartily', 'int frobnitz(int foo)', '{',
|
||||
- \ ' int i;', ' for(i = 0; i < 10; i++)', ' {', ' printf("Your answer is: ");',
|
||||
- \ ' printf("%d\n", foo);', ' }', '}', '', 'int fact(int n)', '{', ' if(n > 1)', ' {',
|
||||
- \ ' return fact(n-1) * n;', ' }', ' return 1;', '}', '', 'int main(int argc, char **argv)',
|
||||
- \ '{', ' frobnitz(fact(10));', '}'],
|
||||
- \ ['#include <stdio.h>', '', 'int fib(int n)', '{', ' if(n > 2)', ' {',
|
||||
- \ ' return fib(n-1) + fib(n-2);', ' }', ' return 1;', '}', '', '// Frobs foo heartily',
|
||||
- \ 'int frobnitz(int foo)', '{', ' int i;', ' for(i = 0; i < 10; i++)', ' {',
|
||||
- \ ' printf("%d\n", foo);', ' }', '}', '',
|
||||
- \ 'int main(int argc, char **argv)', '{', ' frobnitz(fib(10));', '}'])
|
||||
- call term_sendkeys(buf, ":diffupdate!\<cr>")
|
||||
- call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_07', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":set diffopt+=algorithm:patience\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_08', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":set diffopt+=algorithm:histogram\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_09', {})
|
||||
-
|
||||
- " Test 10-11: normal/indent-heuristic
|
||||
- call term_sendkeys(buf, ":set diffopt&vim\<cr>")
|
||||
- call WriteDiffFiles(buf, ['', ' def finalize(values)', '', ' values.each do |v|', ' v.finalize', ' end'],
|
||||
- \ ['', ' def finalize(values)', '', ' values.each do |v|', ' v.prepare', ' end', '',
|
||||
- \ ' values.each do |v|', ' v.finalize', ' end'])
|
||||
- call term_sendkeys(buf, ":diffupdate!\<cr>")
|
||||
- call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_10', {})
|
||||
-
|
||||
- " Leave trailing : at commandline!
|
||||
- call term_sendkeys(buf, ":set diffopt+=indent-heuristic\<cr>:\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_11', {}, 'one')
|
||||
- " shouldn't matter, if indent-algorithm comes before or after the algorithm
|
||||
- call term_sendkeys(buf, ":set diffopt&\<cr>")
|
||||
- call term_sendkeys(buf, ":set diffopt+=indent-heuristic,algorithm:patience\<cr>:\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_11', {}, 'two')
|
||||
- call term_sendkeys(buf, ":set diffopt&\<cr>")
|
||||
- call term_sendkeys(buf, ":set diffopt+=algorithm:patience,indent-heuristic\<cr>:\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_11', {}, 'three')
|
||||
-
|
||||
- " Test 12: diff the same file
|
||||
- call WriteDiffFiles(buf, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
|
||||
- call VerifyBoth(buf, 'Test_diff_12', '')
|
||||
-
|
||||
- " Test 13: diff an empty file
|
||||
- call WriteDiffFiles(buf, [], [])
|
||||
- call VerifyBoth(buf, 'Test_diff_13', '')
|
||||
-
|
||||
- " Test 14: test diffopt+=icase
|
||||
- call WriteDiffFiles(buf, ['a', 'b', 'cd'], ['A', 'b', 'cDe'])
|
||||
- call VerifyBoth(buf, 'Test_diff_14', " diffopt+=filler diffopt+=icase")
|
||||
-
|
||||
- " Test 15-16: test diffopt+=iwhite
|
||||
- call WriteDiffFiles(buf, ['int main()', '{', ' printf("Hello, World!");', ' return 0;', '}'],
|
||||
- \ ['int main()', '{', ' if (0)', ' {', ' printf("Hello, World!");', ' return 0;', ' }', '}'])
|
||||
- call term_sendkeys(buf, ":diffupdate!\<cr>")
|
||||
- call term_sendkeys(buf, ":set diffopt&vim diffopt+=filler diffopt+=iwhite\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_15', {})
|
||||
- call term_sendkeys(buf, ":set diffopt+=internal\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_16', {})
|
||||
-
|
||||
- " Test 17: test diffopt+=iblank
|
||||
- call WriteDiffFiles(buf, ['a', ' ', 'cd', 'ef', 'xxx'], ['a', 'cd', '', 'ef', 'yyy'])
|
||||
- call VerifyInternal(buf, 'Test_diff_17', " diffopt+=iblank")
|
||||
-
|
||||
- " Test 18: test diffopt+=iblank,iwhite / iwhiteall / iwhiteeol
|
||||
- call VerifyInternal(buf, 'Test_diff_18', " diffopt+=iblank,iwhite")
|
||||
- call VerifyInternal(buf, 'Test_diff_18', " diffopt+=iblank,iwhiteall")
|
||||
- call VerifyInternal(buf, 'Test_diff_18', " diffopt+=iblank,iwhiteeol")
|
||||
-
|
||||
- " Test 19: test diffopt+=iwhiteeol
|
||||
- call WriteDiffFiles(buf, ['a ', 'x', 'cd', 'ef', 'xx xx', 'foo', 'bar'], ['a', 'x', 'c d', ' ef', 'xx xx', 'foo', '', 'bar'])
|
||||
- call VerifyInternal(buf, 'Test_diff_19', " diffopt+=iwhiteeol")
|
||||
-
|
||||
- " Test 19: test diffopt+=iwhiteall
|
||||
- call VerifyInternal(buf, 'Test_diff_20', " diffopt+=iwhiteall")
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('Xfile1')
|
||||
- call delete('Xfile2')
|
||||
-endfunc
|
||||
-
|
||||
-func Test_diff_with_cursorline()
|
||||
- CheckScreendump
|
||||
-
|
||||
- call writefile([
|
||||
- \ 'hi CursorLine ctermbg=red ctermfg=white',
|
||||
- \ 'set cursorline',
|
||||
- \ 'call setline(1, ["foo","foo","foo","bar"])',
|
||||
- \ 'vnew',
|
||||
- \ 'call setline(1, ["bee","foo","foo","baz"])',
|
||||
- \ 'windo diffthis',
|
||||
- \ '2wincmd w',
|
||||
- \ ], 'Xtest_diff_cursorline')
|
||||
- let buf = RunVimInTerminal('-S Xtest_diff_cursorline', {})
|
||||
-
|
||||
- call VerifyScreenDump(buf, 'Test_diff_with_cursorline_01', {})
|
||||
- call term_sendkeys(buf, "j")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_with_cursorline_02', {})
|
||||
- call term_sendkeys(buf, "j")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_with_cursorline_03', {})
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('Xtest_diff_cursorline')
|
||||
-endfunc
|
||||
-
|
||||
func Test_diff_with_syntax()
|
||||
CheckScreendump
|
||||
|
||||
@@ -941,30 +784,6 @@ func Test_diff_with_syntax()
|
||||
call delete('Xprogram2.c')
|
||||
endfunc
|
||||
|
||||
-func Test_diff_of_diff()
|
||||
- CheckScreendump
|
||||
- CheckFeature rightleft
|
||||
-
|
||||
- call writefile([
|
||||
- \ 'call setline(1, ["aa","bb","cc","@@ -3,2 +5,7 @@","dd","ee","ff"])',
|
||||
- \ 'vnew',
|
||||
- \ 'call setline(1, ["aa","bb","cc"])',
|
||||
- \ 'windo diffthis',
|
||||
- \ '1wincmd w',
|
||||
- \ 'setlocal number',
|
||||
- \ ], 'Xtest_diff_diff')
|
||||
- let buf = RunVimInTerminal('-S Xtest_diff_diff', {})
|
||||
-
|
||||
- call VerifyScreenDump(buf, 'Test_diff_of_diff_01', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":set rightleft\<cr>")
|
||||
- call VerifyScreenDump(buf, 'Test_diff_of_diff_02', {})
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('Xtest_diff_diff')
|
||||
-endfunc
|
||||
-
|
||||
func CloseoffSetup()
|
||||
enew
|
||||
call setline(1, ['one', 'two', 'three'])
|
||||
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
|
||||
index 31357e7..15cd11a 100644
|
||||
--- a/src/testdir/test_filetype.vim
|
||||
+++ b/src/testdir/test_filetype.vim
|
||||
@@ -538,15 +538,6 @@ func CheckItems(checks)
|
||||
endfor
|
||||
endfunc
|
||||
|
||||
-func Test_filetype_detection()
|
||||
- filetype on
|
||||
- call CheckItems(s:filename_checks)
|
||||
- if has('fname_case')
|
||||
- call CheckItems(s:filename_case_checks)
|
||||
- endif
|
||||
- filetype off
|
||||
-endfunc
|
||||
-
|
||||
" Filetypes detected from the file contents by scripts.vim
|
||||
let s:script_checks = {
|
||||
\ 'virata': [['% Virata'],
|
||||
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
|
||||
index d5ee716..43e6028 100644
|
||||
--- a/src/testdir/test_popupwin.vim
|
||||
+++ b/src/testdir/test_popupwin.vim
|
||||
@@ -519,122 +519,6 @@ func Test_popup_noscrolloff()
|
||||
call popup_close(winid)
|
||||
endfunc
|
||||
|
||||
-func Test_popup_drag()
|
||||
- CheckScreendump
|
||||
-
|
||||
- " create a popup that covers the command line
|
||||
- let lines =<< trim END
|
||||
- call setline(1, range(1, 20))
|
||||
- split
|
||||
- vsplit
|
||||
- $wincmd w
|
||||
- vsplit
|
||||
- 1wincmd w
|
||||
- let winid = popup_create(['1111', '222222', '33333'], #{
|
||||
- \ drag: 1,
|
||||
- \ resize: 1,
|
||||
- \ border: [],
|
||||
- \ line: &lines - 4,
|
||||
- \ })
|
||||
- func Dragit()
|
||||
- call feedkeys("\<F3>\<LeftMouse>\<F4>\<LeftDrag>\<LeftRelease>", "xt")
|
||||
- endfunc
|
||||
- map <silent> <F3> :call test_setmouse(&lines - 4, &columns / 2)<CR>
|
||||
- map <silent> <F4> :call test_setmouse(&lines - 8, &columns / 2 - 20)<CR>
|
||||
- func Resize()
|
||||
- call feedkeys("\<F5>\<LeftMouse>\<F6>\<LeftDrag>\<LeftRelease>", "xt")
|
||||
- endfunc
|
||||
- map <silent> <F5> :call test_setmouse(6, 21)<CR>
|
||||
- map <silent> <F6> :call test_setmouse(7, 25)<CR>
|
||||
- END
|
||||
- call writefile(lines, 'XtestPopupDrag')
|
||||
- let buf = RunVimInTerminal('-S XtestPopupDrag', #{rows: 10})
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_drag_01', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call Dragit()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_drag_02', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call Resize()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_drag_03', {})
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('XtestPopupDrag')
|
||||
-endfunc
|
||||
-
|
||||
-func Test_popup_close_with_mouse()
|
||||
- CheckScreendump
|
||||
-
|
||||
- let lines =<< trim END
|
||||
- call setline(1, range(1, 20))
|
||||
- " With border, can click on X
|
||||
- let winid = popup_create('foobar', #{
|
||||
- \ close: 'button',
|
||||
- \ border: [],
|
||||
- \ line: 1,
|
||||
- \ col: 1,
|
||||
- \ })
|
||||
- func CloseMsg(id, result)
|
||||
- echomsg 'Popup closed with ' .. a:result
|
||||
- endfunc
|
||||
- let winid = popup_create('notification', #{
|
||||
- \ close: 'click',
|
||||
- \ line: 3,
|
||||
- \ col: 15,
|
||||
- \ callback: 'CloseMsg',
|
||||
- \ })
|
||||
- let winid = popup_create('no border here', #{
|
||||
- \ close: 'button',
|
||||
- \ line: 5,
|
||||
- \ col: 3,
|
||||
- \ })
|
||||
- let winid = popup_create('only padding', #{
|
||||
- \ close: 'button',
|
||||
- \ padding: [],
|
||||
- \ line: 5,
|
||||
- \ col: 23,
|
||||
- \ })
|
||||
- func CloseWithX()
|
||||
- call feedkeys("\<F3>\<LeftMouse>\<LeftRelease>", "xt")
|
||||
- endfunc
|
||||
- map <silent> <F3> :call test_setmouse(1, len('foobar') + 2)<CR>
|
||||
- func CloseWithClick()
|
||||
- call feedkeys("\<F4>\<LeftMouse>\<LeftRelease>", "xt")
|
||||
- endfunc
|
||||
- map <silent> <F4> :call test_setmouse(3, 17)<CR>
|
||||
- func CreateWithMenuFilter()
|
||||
- let winid = popup_create('barfoo', #{
|
||||
- \ close: 'button',
|
||||
- \ filter: 'popup_filter_menu',
|
||||
- \ border: [],
|
||||
- \ line: 1,
|
||||
- \ col: 40,
|
||||
- \ })
|
||||
- endfunc
|
||||
- END
|
||||
- call writefile(lines, 'XtestPopupClose')
|
||||
- let buf = RunVimInTerminal('-S XtestPopupClose', #{rows: 10})
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_close_01', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call CloseWithX()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_close_02', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call CloseWithClick()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_close_03', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call CreateWithMenuFilter()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_close_04', {})
|
||||
-
|
||||
- " We have to send the actual mouse code, feedkeys() would be caught the
|
||||
- " filter.
|
||||
- call term_sendkeys(buf, "\<Esc>[<0;47;1M")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_close_05', {})
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('XtestPopupClose')
|
||||
-endfunction
|
||||
-
|
||||
func Test_popup_menu_wrap()
|
||||
CheckScreendump
|
||||
|
||||
@@ -1335,52 +1219,6 @@ func Test_popup_atcursor_pos()
|
||||
call delete('XtestPopupAtcursorPos')
|
||||
endfunc
|
||||
|
||||
-func Test_popup_beval()
|
||||
- CheckScreendump
|
||||
- CheckFeature balloon_eval_term
|
||||
-
|
||||
- let lines =<< trim END
|
||||
- call setline(1, range(1, 20))
|
||||
- call setline(5, 'here is some text to hover over')
|
||||
- set balloonevalterm
|
||||
- set balloonexpr=BalloonExpr()
|
||||
- set balloondelay=100
|
||||
- func BalloonExpr()
|
||||
- let s:winid = [v:beval_text]->popup_beval({})
|
||||
- return ''
|
||||
- endfunc
|
||||
- func Hover()
|
||||
- call test_setmouse(5, 15)
|
||||
- call feedkeys("\<MouseMove>\<Ignore>", "xt")
|
||||
- sleep 100m
|
||||
- endfunc
|
||||
- func MoveOntoPopup()
|
||||
- call test_setmouse(4, 17)
|
||||
- call feedkeys("\<F4>\<MouseMove>\<Ignore>", "xt")
|
||||
- endfunc
|
||||
- func MoveAway()
|
||||
- call test_setmouse(5, 13)
|
||||
- call feedkeys("\<F5>\<MouseMove>\<Ignore>", "xt")
|
||||
- endfunc
|
||||
- END
|
||||
- call writefile(lines, 'XtestPopupBeval')
|
||||
- let buf = RunVimInTerminal('-S XtestPopupBeval', #{rows: 10})
|
||||
- call term_wait(buf, 100)
|
||||
- call term_sendkeys(buf, 'j')
|
||||
- call term_sendkeys(buf, ":call Hover()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_beval_1', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call MoveOntoPopup()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_beval_2', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call MoveAway()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_beval_3', {})
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('XtestPopupBeval')
|
||||
-endfunc
|
||||
-
|
||||
func Test_popup_filter()
|
||||
new
|
||||
call setline(1, 'some text')
|
||||
@@ -1895,129 +1733,6 @@ func Test_notifications()
|
||||
call delete('XtestNotifications')
|
||||
endfunc
|
||||
|
||||
-func Test_popup_scrollbar()
|
||||
- CheckScreendump
|
||||
-
|
||||
- let lines =<< trim END
|
||||
- call setline(1, range(1, 20))
|
||||
- hi ScrollThumb ctermbg=blue
|
||||
- hi ScrollBar ctermbg=red
|
||||
- let winid = popup_create(['one', 'two', 'three', 'four', 'five',
|
||||
- \ 'six', 'seven', 'eight', 'nine'], #{
|
||||
- \ minwidth: 8,
|
||||
- \ maxheight: 4,
|
||||
- \ })
|
||||
- func ScrollUp()
|
||||
- call feedkeys("\<F3>\<ScrollWheelUp>", "xt")
|
||||
- endfunc
|
||||
- func ScrollDown()
|
||||
- call feedkeys("\<F3>\<ScrollWheelDown>", "xt")
|
||||
- endfunc
|
||||
- func ClickTop()
|
||||
- call feedkeys("\<F4>\<LeftMouse>", "xt")
|
||||
- endfunc
|
||||
- func ClickBot()
|
||||
- call popup_setoptions(g:winid, #{border: [], close: 'button'})
|
||||
- call feedkeys("\<F5>\<LeftMouse>", "xt")
|
||||
- endfunc
|
||||
- func Popup_filter(winid, key)
|
||||
- if a:key == 'j'
|
||||
- let line = popup_getoptions(a:winid).firstline
|
||||
- let nlines = line('$', a:winid)
|
||||
- let newline = line < nlines ? (line + 1) : nlines
|
||||
- call popup_setoptions(a:winid, #{firstline: newline})
|
||||
- return v:true
|
||||
- elseif a:key == 'x'
|
||||
- call popup_close(a:winid)
|
||||
- return v:true
|
||||
- endif
|
||||
- endfunc
|
||||
-
|
||||
- func PopupScroll()
|
||||
- call popup_clear()
|
||||
- let text =<< trim END
|
||||
- 1
|
||||
- 2
|
||||
- 3
|
||||
- 4
|
||||
- long line long line long line long line long line long line
|
||||
- long line long line long line long line long line long line
|
||||
- long line long line long line long line long line long line
|
||||
- END
|
||||
- call popup_create(text, #{
|
||||
- \ minwidth: 30,
|
||||
- \ maxwidth: 30,
|
||||
- \ minheight: 4,
|
||||
- \ maxheight: 4,
|
||||
- \ firstline: 1,
|
||||
- \ lastline: 4,
|
||||
- \ wrap: v:true,
|
||||
- \ scrollbar: v:true,
|
||||
- \ mapping: v:false,
|
||||
- \ filter: funcref('Popup_filter')
|
||||
- \ })
|
||||
- endfunc
|
||||
- map <silent> <F3> :call test_setmouse(5, 36)<CR>
|
||||
- map <silent> <F4> :call test_setmouse(4, 42)<CR>
|
||||
- map <silent> <F5> :call test_setmouse(7, 42)<CR>
|
||||
- END
|
||||
- call writefile(lines, 'XtestPopupScroll')
|
||||
- let buf = RunVimInTerminal('-S XtestPopupScroll', #{rows: 10})
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_1', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call popup_setoptions(winid, #{firstline: 2})\<CR>")
|
||||
- call term_sendkeys(buf, ":\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_2', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call popup_setoptions(winid, #{firstline: 6})\<CR>")
|
||||
- call term_sendkeys(buf, ":\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_3', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call popup_setoptions(winid, #{firstline: 9})\<CR>")
|
||||
- call term_sendkeys(buf, ":\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_4', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call popup_setoptions(winid, #{scrollbarhighlight: 'ScrollBar', thumbhighlight: 'ScrollThumb', firstline: 5})\<CR>")
|
||||
- " this scrolls two lines (half the window height)
|
||||
- call term_sendkeys(buf, ":call ScrollUp()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_5', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call ScrollDown()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_6', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call ScrollDown()\<CR>")
|
||||
- " wait a bit, otherwise it fails sometimes (double click recognized?)
|
||||
- sleep 100m
|
||||
- call term_sendkeys(buf, ":call ScrollDown()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_7', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call ClickTop()\<CR>")
|
||||
- sleep 100m
|
||||
- call term_sendkeys(buf, ":call ClickTop()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_8', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":call ClickBot()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_9', {})
|
||||
-
|
||||
- " remove the minwidth and maxheight
|
||||
- call term_sendkeys(buf, ":call popup_setoptions(winid, #{maxheight: 0, minwidth: 0})\<CR>")
|
||||
- call term_sendkeys(buf, ":\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_10', {})
|
||||
-
|
||||
- " check size with non-wrapping lines
|
||||
- call term_sendkeys(buf, ":call PopupScroll()\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_11', {})
|
||||
-
|
||||
- " check size with wrapping lines
|
||||
- call term_sendkeys(buf, "j")
|
||||
- call VerifyScreenDump(buf, 'Test_popupwin_scroll_12', {})
|
||||
- call term_sendkeys(buf, "x")
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('XtestPopupScroll')
|
||||
-endfunc
|
||||
-
|
||||
func Test_popup_fitting_scrollbar()
|
||||
" this was causing a crash, divide by zero
|
||||
let winid = popup_create([
|
||||
diff --git a/src/testdir/test_popupwin_textprop.vim b/src/testdir/test_popupwin_textprop.vim
|
||||
index 1b339d4..a42129d 100644
|
||||
--- a/src/testdir/test_popupwin_textprop.vim
|
||||
+++ b/src/testdir/test_popupwin_textprop.vim
|
||||
@@ -7,170 +7,4 @@ CheckFeature textprop
|
||||
source screendump.vim
|
||||
CheckScreendump
|
||||
|
||||
-func Test_textprop_popup()
|
||||
- let lines =<< trim END
|
||||
- call setline(1, range(1, 100))
|
||||
- call setline(50, 'some text to work with')
|
||||
- 50
|
||||
- normal zz
|
||||
- set scrolloff=0
|
||||
- call prop_type_add('popupMarker', #{highlight: 'DiffAdd', bufnr: bufnr('%')})
|
||||
- call prop_add(50, 11, #{
|
||||
- \ length: 7,
|
||||
- \ type: 'popupMarker',
|
||||
- \ bufnr: bufnr('%'),
|
||||
- \ })
|
||||
- let winid = popup_create('the text', #{
|
||||
- \ pos: 'botleft',
|
||||
- \ textprop: 'popupMarker',
|
||||
- \ border: [],
|
||||
- \ padding: [0,1,0,1],
|
||||
- \ close: 'click',
|
||||
- \ })
|
||||
- END
|
||||
- call writefile(lines, 'XtestTextpropPopup')
|
||||
- let buf = RunVimInTerminal('-S XtestTextpropPopup', #{rows: 10})
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_01', {})
|
||||
-
|
||||
- call term_sendkeys(buf, "zt")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_02', {})
|
||||
-
|
||||
- call term_sendkeys(buf, "zzIawe\<Esc>")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_03', {})
|
||||
-
|
||||
- call term_sendkeys(buf, "0dw")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_04', {})
|
||||
-
|
||||
- call term_sendkeys(buf, "Oinserted\<Esc>")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_05', {})
|
||||
-
|
||||
- call term_sendkeys(buf, "k2dd")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_06', {})
|
||||
-
|
||||
- call term_sendkeys(buf, "4\<C-E>")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_07', {})
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('XtestTextpropPopup')
|
||||
-endfunc
|
||||
-
|
||||
-func Test_textprop_popup_corners()
|
||||
- let lines =<< trim END
|
||||
- call setline(1, range(1, 100))
|
||||
- call setline(50, 'now working with some longer text here')
|
||||
- 50
|
||||
- normal zz
|
||||
- set scrolloff=0
|
||||
- call prop_type_add('popupMarker', #{highlight: 'DiffAdd'})
|
||||
- call prop_add(50, 23, #{
|
||||
- \ length: 6,
|
||||
- \ type: 'popupMarker',
|
||||
- \ })
|
||||
- let winid = popup_create('bottom left', #{
|
||||
- \ pos: 'botleft',
|
||||
- \ textprop: 'popupMarker',
|
||||
- \ textpropwin: win_getid(),
|
||||
- \ padding: [0,1,0,1],
|
||||
- \ })
|
||||
- let winid = popup_create('bottom right', #{
|
||||
- \ pos: 'botright',
|
||||
- \ textprop: 'popupMarker',
|
||||
- \ border: [],
|
||||
- \ padding: [0,1,0,1],
|
||||
- \ })
|
||||
- let winid = popup_create('top left', #{
|
||||
- \ pos: 'topleft',
|
||||
- \ textprop: 'popupMarker',
|
||||
- \ border: [],
|
||||
- \ padding: [0,1,0,1],
|
||||
- \ })
|
||||
- let winid = popup_create('top right', #{
|
||||
- \ pos: 'topright',
|
||||
- \ textprop: 'popupMarker',
|
||||
- \ padding: [0,1,0,1],
|
||||
- \ })
|
||||
- END
|
||||
- call writefile(lines, 'XtestTextpropPopupCorners')
|
||||
- let buf = RunVimInTerminal('-S XtestTextpropPopupCorners', #{rows: 12})
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_1', {})
|
||||
-
|
||||
- call term_sendkeys(buf, "0dw")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_2', {})
|
||||
-
|
||||
- call term_sendkeys(buf, "46Goextra\<Esc>")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_3', {})
|
||||
-
|
||||
- call term_sendkeys(buf, "u")
|
||||
- call term_sendkeys(buf, ":\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_4', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":vsplit foo\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_5', {})
|
||||
-
|
||||
- call term_sendkeys(buf, ":only!\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_corn_6', {})
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('XtestTextpropPopupCorners')
|
||||
-endfunc
|
||||
-
|
||||
-func Test_textprop_popup_offsets()
|
||||
- let lines =<< trim END
|
||||
- call setline(1, range(1, 100))
|
||||
- call setline(50, 'now working with some longer text here')
|
||||
- 50
|
||||
- normal zz
|
||||
- set scrolloff=0
|
||||
- call prop_type_add('popupMarker', #{highlight: 'DiffAdd'})
|
||||
- call prop_add(50, 23, #{
|
||||
- \ length: 6,
|
||||
- \ type: 'popupMarker',
|
||||
- \ })
|
||||
- let winid = popup_create('bottom left', #{
|
||||
- \ pos: 'botleft',
|
||||
- \ line: -1,
|
||||
- \ col: 2,
|
||||
- \ textprop: 'popupMarker',
|
||||
- \ padding: [0,1,0,1],
|
||||
- \ })
|
||||
- let winid = popup_create('bottom right', #{
|
||||
- \ pos: 'botright',
|
||||
- \ line: -1,
|
||||
- \ col: -2,
|
||||
- \ textprop: 'popupMarker',
|
||||
- \ border: [],
|
||||
- \ padding: [0,1,0,1],
|
||||
- \ })
|
||||
- let winid = popup_create('top left', #{
|
||||
- \ pos: 'topleft',
|
||||
- \ line: 1,
|
||||
- \ col: 2,
|
||||
- \ textprop: 'popupMarker',
|
||||
- \ border: [],
|
||||
- \ padding: [0,1,0,1],
|
||||
- \ })
|
||||
- let winid = popup_create('top right', #{
|
||||
- \ pos: 'topright',
|
||||
- \ line: 1,
|
||||
- \ col: -2,
|
||||
- \ textprop: 'popupMarker',
|
||||
- \ padding: [0,1,0,1],
|
||||
- \ })
|
||||
- END
|
||||
- call writefile(lines, 'XtestTextpropPopupOffset')
|
||||
- let buf = RunVimInTerminal('-S XtestTextpropPopupOffset', #{rows: 12})
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_off_1', {})
|
||||
-
|
||||
- " test that removing the text property closes the popups
|
||||
- call term_sendkeys(buf, ":call prop_clear(50)\<CR>")
|
||||
- call VerifyScreenDump(buf, 'Test_popup_textprop_off_2', {})
|
||||
-
|
||||
- " clean up
|
||||
- call StopVimInTerminal(buf)
|
||||
- call delete('XtestTextpropPopupOffset')
|
||||
-endfunc
|
||||
-
|
||||
-
|
||||
" vim: shiftwidth=2 sts=2
|
||||
--
|
||||
2.19.1
|
||||
|
||||
87
vim.spec
87
vim.spec
@ -11,7 +11,7 @@
|
||||
Name: vim
|
||||
Epoch: 2
|
||||
Version: 8.2
|
||||
Release: 16
|
||||
Release: 17
|
||||
Summary: Vim is a highly configurable text editor for efficiently creating and changing any kind of text.
|
||||
License: Vim and MIT
|
||||
URL: http://www.vim.org
|
||||
@ -39,41 +39,47 @@ Patch6005: backport-CVE-2021-3872.patch
|
||||
Patch6006: backport-CVE-2021-3875.patch
|
||||
Patch6007: backport-CVE-2021-3903.patch
|
||||
Patch6008: backport-CVE-2021-3927.patch
|
||||
Patch6009: backport-CVE-2021-3928.patch
|
||||
Patch6010: backport-CVE-2021-3973.patch
|
||||
Patch6011: backport-CVE-2021-3974.patch
|
||||
Patch6012: backport-find-test-fails.patch
|
||||
Patch6013: backport-no-early-check-if-find-and-sfind-have-an-argument.patch
|
||||
Patch6014: backport-CVE-2021-3984.patch
|
||||
Patch6015: backport-CVE-2021-4019.patch
|
||||
Patch6016: backport-CVE-2021-4069.patch
|
||||
Patch6017: backport-missing-error-message.patch
|
||||
Patch6018: backport-fix-giving-the-error-0-more-files-to-edit.patch
|
||||
Patch6019: backport-add-the-arglist_locked-flag.patch
|
||||
Patch6020: backport-CVE-2021-4166.patch
|
||||
Patch6021: backport-fix-arglist-test-fails.patch
|
||||
Patch6022: backport-CVE-2021-4192.patch
|
||||
Patch6023: backport-CVE-2021-4193.patch
|
||||
Patch6024: backport-CVE-2022-0213.patch
|
||||
Patch6025: backport-CVE-2022-0261.patch
|
||||
Patch6026: backport-CVE-2022-0318.patch
|
||||
Patch6009: backport-cannot-use-z-when-spell-is-off.patch
|
||||
Patch6010: backport-CVE-2021-3928.patch
|
||||
Patch6011: backport-CVE-2021-3973.patch
|
||||
Patch6012: backport-CVE-2021-3974.patch
|
||||
Patch6013: backport-find-test-fails.patch
|
||||
Patch6014: backport-no-early-check-if-find-and-sfind-have-an-argument.patch
|
||||
Patch6015: backport-CVE-2021-3984.patch
|
||||
Patch6016: backport-CVE-2021-4019.patch
|
||||
Patch6017: backport-CVE-2021-4069.patch
|
||||
Patch6018: backport-missing-error-message.patch
|
||||
Patch6019: backport-fix-giving-the-error-0-more-files-to-edit.patch
|
||||
Patch6020: backport-add-the-arglist_locked-flag.patch
|
||||
Patch6021: backport-CVE-2021-4166.patch
|
||||
Patch6022: backport-fix-arglist-test-fails.patch
|
||||
Patch6023: backport-CVE-2021-4192.patch
|
||||
Patch6024: backport-CVE-2021-4193.patch
|
||||
Patch6025: backport-CVE-2022-0213.patch
|
||||
Patch6026: backport-CVE-2022-0261.patch
|
||||
Patch6027: backport-vim-fix-garbled-characters-display-when-file-name-ma.patch
|
||||
Patch6028: backport-CVE-2022-0351.patch
|
||||
Patch6029: backport-CVE-2022-0408.patch
|
||||
Patch6030: backport-CVE-2022-0361.patch
|
||||
Patch6031: backport-CVE-2022-0359.patch
|
||||
Patch6032: backport-CVE-2022-0413.patch
|
||||
Patch6033: backport-CVE-2022-0368.patch
|
||||
Patch6034: backport-CVE-2022-0443.patch
|
||||
Patch6035: backport-CVE-2022-0392.patch
|
||||
Patch6036: backport-invalid-argument-errmsg.patch
|
||||
Patch6037: backport-CVE-2022-0417.patch
|
||||
Patch6028: backport-CVE-2022-0318.patch
|
||||
Patch6029: backport-block-insert-with-double-wide-character-fails.patch
|
||||
Patch6030: backport-CVE-2022-0351.patch
|
||||
Patch6031: backport-CVE-2022-0408.patch
|
||||
Patch6032: backport-CVE-2022-0361.patch
|
||||
Patch6033: backport-command-line-editing-not-sufficiently-tested.patch
|
||||
Patch6034: backport-CVE-2022-0359.patch
|
||||
Patch6035: backport-CVE-2022-0413.patch
|
||||
Patch6036: backport-CVE-2022-0368.patch
|
||||
Patch6037: backport-CVE-2022-0443.patch
|
||||
Patch6038: backport-invalid-argument-errmsg.patch
|
||||
Patch6039: backport-CVE-2022-0417.patch
|
||||
Patch6040: backport-invalid-memory-access-with-search-command.patch
|
||||
Patch6041: backport-bracketed-paste-can-still-cause-invalid-memory-acces.patch
|
||||
Patch6042: backport-CVE-2022-0392.patch
|
||||
|
||||
Patch9000: bugfix-rm-modify-info-version.patch
|
||||
Patch9001: remove-failed-tests-due-to-patch.patch
|
||||
|
||||
BuildRequires: autoconf python-devel python3-devel ncurses-devel gettext perl-devel perl-generators
|
||||
BuildRequires: perl(ExtUtils::Embed) perl(ExtUtils::ParseXS) libacl-devel gpm-devel file
|
||||
BuildRequires: desktop-file-utils >= 0.2.93
|
||||
BuildRequires: desktop-file-utils >= 0.2.93 libtool chrpath
|
||||
%if %{_with_selinux__}
|
||||
BuildRequires: libselinux-devel
|
||||
%endif
|
||||
@ -351,8 +357,13 @@ echo ".so man1/vimtutor.1" > %{buildroot}%{_mandir}/man1/gvimtutor.1
|
||||
echo ".so man1/vi.1" > %{buildroot}%{_mandir}/man5/virc.5
|
||||
touch %{buildroot}%{_datadir}/%{name}/vimfiles/doc/tags
|
||||
|
||||
chrpath -d %{buildroot}%{_bindir}/vim
|
||||
chrpath -d %{buildroot}%{_bindir}/xxd
|
||||
|
||||
mkdir -p %{buildroot}/etc/ld.so.conf.d
|
||||
echo "{_libdir}/perl5/CORE" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
|
||||
pushd runtime
|
||||
rm -rf doc
|
||||
ln -sf ../../%{name}/%{vimdir}/doc docs
|
||||
popd
|
||||
|
||||
@ -363,6 +374,12 @@ popd
|
||||
> %{_datadir}/%{name}/vimfiles/doc/tags || :
|
||||
%{_bindir}/vim -c ":helptags %{_datadir}/%{name}/vimfiles/doc" -c :q &> /dev/null || :
|
||||
|
||||
%check
|
||||
export TERM=linux
|
||||
# Reset the terminal scrolling region left behind by the testsuite
|
||||
trap "printf '\e[r'" EXIT
|
||||
LC_ALL=en_US.UTF-8 make -j1 test
|
||||
|
||||
%files common
|
||||
%exclude %{_datadir}/vim/%{vimdir}/macros/maze/maze*.c
|
||||
%exclude %{_datadir}/vim/%{vimdir}/tools
|
||||
@ -430,6 +447,7 @@ popd
|
||||
%{_mandir}/man1/{gex.*,gview.*,gvim*,rvim.*,vim.*,vimdiff.*}
|
||||
%{_mandir}/man1/{vimtutor.*,vimx.*,xxd.*}
|
||||
%{_mandir}/man5/vimrc.*
|
||||
%config(noreplace) /etc/ld.so.conf.d/*
|
||||
|
||||
%files minimal
|
||||
%config(noreplace) %{_sysconfdir}/virc
|
||||
@ -439,6 +457,7 @@ popd
|
||||
|
||||
%files enhanced
|
||||
%{_bindir}/{vim,rvim,vimdiff,vimtutor}
|
||||
%config(noreplace) /etc/ld.so.conf.d/*
|
||||
|
||||
%files filesystem
|
||||
%dir %{_datadir}/%{name}/vimfiles/after/*
|
||||
@ -456,6 +475,12 @@ popd
|
||||
%{_mandir}/man1/evim.*
|
||||
|
||||
%changelog
|
||||
* Wed Feb 16 2022 yuanxin <yuanxin24@h-partners.com> - 2:8.2-17
|
||||
- Type:bugfix
|
||||
- ID:NA
|
||||
- SUG:NA
|
||||
- DESC:add make check
|
||||
|
||||
* Wed Feb 09 2022 tianwei <tianwei12@h-partners.com> - 2:8.2-16
|
||||
- Type:CVE
|
||||
- ID:CVE-2022-0443 CVE-2022-0392 CVE-2022-0417
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user