From 6fd7cc3e45af5c1c560f82556914f8039c397a7e Mon Sep 17 00:00:00 2001 From: Chunmei Xu Date: Wed, 27 Apr 2022 16:53:02 +0800 Subject: [PATCH] fix copy and paste Signed-off-by: Chunmei Xu --- vim-8.0-copy-paste.patch | 97 ++++++++++++++++++++++++++++++++++++++++ vim.spec | 8 +++- 2 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 vim-8.0-copy-paste.patch diff --git a/vim-8.0-copy-paste.patch b/vim-8.0-copy-paste.patch new file mode 100644 index 0000000..4e5d82b --- /dev/null +++ b/vim-8.0-copy-paste.patch @@ -0,0 +1,97 @@ +From 72cf150f42b112b89bc58f4a233e94a50c1576b1 Mon Sep 17 00:00:00 2001 +From: Chunmei Xu +Date: Wed, 27 Apr 2022 16:47:39 +0800 +Subject: [PATCH] vim 8.0 copy paste + +refer to: +https://src.fedoraproject.org/rpms/vim/blob/rawhide/f/vim-8.0-copy-paste.patch + +Signed-off-by: Chunmei Xu +--- + runtime/defaults.vim | 12 ------------ + src/testdir/test_balloon.vim | 1 + + src/testdir/test_popupwin.vim | 5 +++++ + 3 files changed, 6 insertions(+), 12 deletions(-) + +diff --git a/runtime/defaults.vim b/runtime/defaults.vim +index f1d5cd1..b08de8e 100644 +--- a/runtime/defaults.vim ++++ b/runtime/defaults.vim +@@ -74,18 +74,6 @@ sunmap Q + " Revert with ":iunmap ". + inoremap u + +-" In many terminal emulators the mouse works just fine. By enabling it you +-" can position the cursor, Visually select and scroll with the mouse. +-" Only xterm can grab the mouse events when using the shift key, for other +-" terminals use ":", select text and press Esc. +-if has('mouse') +- if &term =~ 'xterm' +- set mouse=a +- else +- set mouse=nvi +- endif +-endif +- + " Only do this part when Vim was compiled with the +eval feature. + if 1 + +diff --git a/src/testdir/test_balloon.vim b/src/testdir/test_balloon.vim +index ed0c6c1..90c8c40 100644 +--- a/src/testdir/test_balloon.vim ++++ b/src/testdir/test_balloon.vim +@@ -9,6 +9,7 @@ source screendump.vim + CheckScreendump + + let s:common_script =<< trim [CODE] ++ set mouse=a + call setline(1, ["one one one", "two tXo two", "three three three"]) + set balloonevalterm balloonexpr=MyBalloonExpr()..s:trailing balloondelay=100 + let s:trailing = '<' " check that script context is set +diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim +index fda6992..632f445 100644 +--- a/src/testdir/test_popupwin.vim ++++ b/src/testdir/test_popupwin.vim +@@ -553,6 +553,7 @@ func Test_popup_drag() + " create a popup that covers the command line + let lines =<< trim END + call setline(1, range(1, 20)) ++ set mouse=a + split + vsplit + $wincmd w +@@ -625,6 +626,7 @@ func Test_popup_drag_termwin() + let lines =<< trim END + set foldmethod=marker + call setline(1, range(100)) ++ set mouse=a + for nr in range(7) + call setline(nr * 12 + 1, "fold {{{") + call setline(nr * 12 + 11, "end }}}") +@@ -678,6 +680,7 @@ func Test_popup_close_with_mouse() + + let lines =<< trim END + call setline(1, range(1, 20)) ++ set mouse=a + " With border, can click on X + let winid = popup_create('foobar', #{ + \ close: 'button', +@@ -1513,6 +1516,7 @@ func Test_popup_beval() + let lines =<< trim END + call setline(1, range(1, 20)) + call setline(5, 'here is some text to hover over') ++ set mouse=a + set balloonevalterm + set balloonexpr=BalloonExpr() + set balloondelay=100 +@@ -2218,6 +2222,7 @@ func Test_popup_scrollbar() + + let lines =<< trim END + call setline(1, range(1, 20)) ++ set mouse=a + hi ScrollThumb ctermbg=blue + hi ScrollBar ctermbg=red + let winid = popup_create(['one', 'two', 'three', 'four', 'five', +-- +2.34.1 + diff --git a/vim.spec b/vim.spec index 61dc5f4..36bfbd6 100644 --- a/vim.spec +++ b/vim.spec @@ -1,4 +1,4 @@ -%define anolis_release 2 +%define anolis_release 3 %bcond_without gui %bcond_with default_editor %bcond_with libsodium_crypt @@ -51,6 +51,8 @@ Source11: vim-default-editor.fish Source12: view_wrapper Source13: vi_wrapper +Patch1: vim-8.0-copy-paste.patch + # uses autoconf in spec file BuildRequires: autoconf @@ -296,6 +298,7 @@ This subpackage contains files needed to set Vim as the default editor. %prep %setup -q -b 0 -n vim-%{baseversion}.%{patchlevel} +%patch1 -p1 # fix rogue dependencies from sample code chmod -x runtime/tools/mve.awk @@ -890,6 +893,9 @@ touch %{buildroot}/%{_datadir}/%{name}/vimfiles/doc/tags %endif %changelog +* Mon Mar 21 2022 Chunmei Xu - 2:8.2-3 +- fix copy and paste + * Mon Mar 21 2022 Chunmei Xu - 2:8.2-2 - optimise Conflicts version -- Gitee