On 2023/10/11 20:46, Laurence Tratt wrote: > On Thu, Aug 31, 2023 at 08:27:11AM +0100, Laurence Tratt wrote: > > [Rafael] > >> Simple update neovim-qt-0.2.17. Tested on amd64. OK? > > There is at least 1 annoying regression in 0.2.17 which is why I didn't > > end up submitting an update. Those have been fixed in master, and I keep > > hoping for a 0.2.18 release... I must confess that I didn't expect to be > > hoping for quite so long :/ > > I've now encountered my first (minor, but still annoying) case where a > neovim plugin wants something from neovim-qt that 0.2.16 doesn't support > but 0.2.17 does. Since there's still no date for a 0.2.18 release, I've > backported a fix from master to 0.2.17 that makes Shift-Del work. That's > a very specific, perhaps even selfish, backport but without that I find > 0.2.17 unusable. > > In case we're interested in including this, I attach my update. > Otherwise I think we should use Rafael's update to "plain" 0.2.17.
Makes complete sense to me to add the patches. They're committed upstream so don't make it harder to update later. I'll just change the patch comments to refer to the commit rather than PR. > > Laurie > > > diff --git editors/neovim-qt/Makefile editors/neovim-qt/Makefile > index da4c9d9644e..727b5258375 100644 > --- editors/neovim-qt/Makefile > +++ editors/neovim-qt/Makefile > @@ -2,8 +2,7 @@ COMMENT = Qt5 GUI front-end for neovim > > GH_ACCOUNT = equalsraf > GH_PROJECT = neovim-qt > -GH_TAGNAME = v0.2.16.1 > -REVISION = 3 > +GH_TAGNAME = v0.2.17 > > CATEGORIES = editors > > diff --git editors/neovim-qt/distinfo editors/neovim-qt/distinfo > index 462296c3fef..13a1ccea2a3 100644 > --- editors/neovim-qt/distinfo > +++ editors/neovim-qt/distinfo > @@ -1,2 +1,2 @@ > -SHA256 (neovim-qt-0.2.16.1.tar.gz) = > lx1Fl7QN8nVrMTr+GZbweRVkPovxDv5Ba2TMM35Pryo= > -SIZE (neovim-qt-0.2.16.1.tar.gz) = 1069176 > +SHA256 (neovim-qt-0.2.17.tar.gz) = > rFOMLl1jVy3QVDwT+vtNQo5nEo6mdkZ/zaaJZbKqzaE= > +SIZE (neovim-qt-0.2.17.tar.gz) = 1076230 > diff --git editors/neovim-qt/patches/patch-src_gui_input_cpp > editors/neovim-qt/patches/patch-src_gui_input_cpp > new file mode 100644 > index 00000000000..4f88a59b4c2 > --- /dev/null > +++ editors/neovim-qt/patches/patch-src_gui_input_cpp > @@ -0,0 +1,19 @@ > +Pull in PR #1049 from neovim-qt upstream. > + > +Index: src/gui/input.cpp > +--- src/gui/input.cpp.orig > ++++ src/gui/input.cpp > +@@ -191,13 +191,6 @@ QString convertKey(const QKeyEvent& ev) noexcept > + const QMap<int, QString>& specialKeys { GetSpecialKeysMap() }; > + > + if (specialKeys.contains(key)) { > +- // Issue#728: Shift + Space inserts ;2u in `:terminal`. > Incorrectly sent as <S-Space>. > +- // Issue#259: Shift + BackSpace inserts 7;2u in `:terminal`. > Incorrectly sent as <S-BS>. > +- if (key == Qt::Key_Space > +- || key == Qt::Key_Backspace) { > +- mod &= ~Qt::ShiftModifier; > +- } > +- > + return ToKeyString(GetModifierPrefix(mod), > specialKeys.value(key)); > + } > + > diff --git > editors/neovim-qt/patches/patch-src_gui_runtime_plugin_nvim_gui_shim_vim > editors/neovim-qt/patches/patch-src_gui_runtime_plugin_nvim_gui_shim_vim > new file mode 100644 > index 00000000000..90d300ff18a > --- /dev/null > +++ editors/neovim-qt/patches/patch-src_gui_runtime_plugin_nvim_gui_shim_vim > @@ -0,0 +1,22 @@ > +Pull in PR #1049 from neovim-qt upstream. > + > +Index: src/gui/runtime/plugin/nvim_gui_shim.vim > +--- src/gui/runtime/plugin/nvim_gui_shim.vim.orig > ++++ src/gui/runtime/plugin/nvim_gui_shim.vim > +@@ -278,3 +278,16 @@ function! s:GuiWindowOpacityCommand(value) abort > + call rpcnotify(0, 'Gui', 'WindowOpacity', a:value) > + endfunction > + command! -nargs=1 GuiWindowOpacity call s:GuiWindowOpacityCommand("<args>") > ++ > ++" Issue 728: Terminal reports ';2u' for key sequences such as <S-Space> > ++" Force-mapping keys is a less-than ideal workaround, but it is the only > ++" option that appeases everyone. Neovim does not report terminal mode. > ++" > ++" See issues: > ++" - https://github.com/neovim/neovim/issues/20325 > ++" - https://github.com/neovim/neovim/issues/19265 > ++" - https://github.com/equalsraf/neovim-qt/issues/999 > ++tnoremap <S-Space> <Space> > ++tnoremap <C-Space> <Space> > ++tnoremap <S-Backspace> <BackSpace> > ++tnoremap <C-Backspace> <Backspace> > diff --git editors/neovim-qt/patches/patch-test_tst_input_common_cpp > editors/neovim-qt/patches/patch-test_tst_input_common_cpp > new file mode 100644 > index 00000000000..0330fa0bd74 > --- /dev/null > +++ editors/neovim-qt/patches/patch-test_tst_input_common_cpp > @@ -0,0 +1,41 @@ > +Pull in PR #1049 from neovim-qt upstream. > + > +Index: test/tst_input_common.cpp > +--- test/tst_input_common.cpp.orig > ++++ test/tst_input_common.cpp > +@@ -15,8 +15,6 @@ private slots: > + void CapsLockIgnored() noexcept; > + void AltGrAloneIgnored() noexcept; > + void AltGrKeyEventWellFormed() noexcept; > +- void ShiftSpaceWellFormed() noexcept; > +- void ShiftBackSpaceWellFormed() noexcept; > + > + // Mouse Input > + void MouseLeftClick() noexcept; > +@@ -135,26 +133,6 @@ void TestInputCommon::CapsLockIgnored() noexcept > + > + QKeyEvent evMetaCapsLock{ QEvent::KeyPress, Qt::Key_CapsLock, > Qt::MetaModifier}; > + QCOMPARE(NeovimQt::Input::convertKey(evMetaCapsLock), QString{ "" }); > +-} > +- > +-void TestInputCommon::ShiftSpaceWellFormed() noexcept > +-{ > +- // Issue#728: Shift + Space inserts ;2u in `:terminal`, mode sent as > <S-Space>. > +- QKeyEvent evShift{ QEvent::KeyPress, Qt::Key_Shift, Qt::ShiftModifier, > "" }; > +- QCOMPARE(NeovimQt::Input::convertKey(evShift), QString{ "" }); > +- > +- QKeyEvent evShiftSpace{ QEvent::KeyPress, Qt::Key_Space, > Qt::ShiftModifier, " " }; > +- QCOMPARE(NeovimQt::Input::convertKey(evShiftSpace), QString{ "<Space>" > }); > +-} > +- > +-void TestInputCommon::ShiftBackSpaceWellFormed() noexcept > +-{ > +- // Issue#259: Shift + BackSpace inserts 7;2u in `:terminal`, mode sent > as <S-BS>. > +- QKeyEvent evShift{ QEvent::KeyPress, Qt::Key_Shift, Qt::ShiftModifier, > "" }; > +- QCOMPARE(NeovimQt::Input::convertKey(evShift), QString{ "" }); > +- > +- QKeyEvent evShiftBackSpace{ QEvent::KeyPress, Qt::Key_Backspace, > Qt::ShiftModifier, "\b" }; > +- QCOMPARE(NeovimQt::Input::convertKey(evShiftBackSpace), QString{ "<BS>" > }); > + } > + > + void TestInputCommon::MouseLeftClick() noexcept > diff --git editors/neovim-qt/pkg/PLIST editors/neovim-qt/pkg/PLIST > index 28877da1bff..2e3b536b5b0 100644 > --- editors/neovim-qt/pkg/PLIST > +++ editors/neovim-qt/pkg/PLIST > @@ -1,9 +1,10 @@ > @bin bin/nvim-qt > share/applications/nvim-qt.desktop > share/icons/hicolor/192x192/apps/nvim-qt.png > +share/icons/hicolor/scalable/apps/nvim-qt.svg > share/nvim-qt/ > +share/nvim-qt/LICENSE > share/nvim-qt/runtime/ > -share/nvim-qt/runtime/README.md > share/nvim-qt/runtime/doc/ > share/nvim-qt/runtime/doc/nvim_gui_shim.txt > share/nvim-qt/runtime/doc/tags >