summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoffeinFlummi2021-04-07 02:53:54 +0200
committerKoffeinFlummi2021-04-07 02:53:54 +0200
commitd31f271eddaf8873b05d7900bb6732e12247c48e (patch)
tree310ea63ab8075afafd86b706f681c4779c2870ff
parent8ad7ca8666f85b6c26ab033ab37844b623d61616 (diff)
downloadaur-d31f271eddaf8873b05d7900bb6732e12247c48e.tar.gz
Fix search regression
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--vim-keybindings.patch60
3 files changed, 54 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a52d82a80eef..a7e4688a0fd7 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = htop-vim-git
pkgdesc = Interactive text-mode process viewer. Patched for vim keybindings
- pkgver = 3.0.5.176.g70fecb4
+ pkgver = 3.0.5.201.gf16aa48
pkgrel = 1
epoch = 1
url = https://github.com/htop-dev/htop
@@ -21,7 +21,7 @@ pkgbase = htop-vim-git
source = git+https://github.com/htop-dev/htop.git
source = vim-keybindings.patch
sha256sums = SKIP
- sha256sums = 6aca35a573a327acfb76d191d9e65d87d14c4ede23dbbe51774b79e424f3f3cb
+ sha256sums = 1637edbcbc491c26eea792f18e935414bffb5be83ce8fbc4d2b2e82dc5012933
pkgname = htop-vim-git
diff --git a/PKGBUILD b/PKGBUILD
index 589eccc617c7..947a26deea8e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
_pkgname=htop
pkgname=${_pkgname}-vim-git
-pkgver=3.0.5.176.g70fecb4
+pkgver=3.0.5.201.gf16aa48
pkgrel=1
epoch=1
pkgdesc="Interactive text-mode process viewer. Patched for vim keybindings"
@@ -19,7 +19,7 @@ options=('!emptydirs')
source=("git+${url}.git"
'vim-keybindings.patch')
sha256sums=('SKIP'
- '6aca35a573a327acfb76d191d9e65d87d14c4ede23dbbe51774b79e424f3f3cb')
+ '1637edbcbc491c26eea792f18e935414bffb5be83ce8fbc4d2b2e82dc5012933')
pkgver() {
cd "${srcdir}/${_pkgname}"
diff --git a/vim-keybindings.patch b/vim-keybindings.patch
index b1ccda5c1c2f..948f6d69bebf 100644
--- a/vim-keybindings.patch
+++ b/vim-keybindings.patch
@@ -96,6 +96,30 @@ index 4ee1ad4..43930da 100644
switch (ch) {
case EVENT_SET_SELECTED:
result = HANDLED;
+diff --git a/MainPanel.c b/MainPanel.c
+index 842e8e1..93a8895 100644
+--- a/MainPanel.c
++++ b/MainPanel.c
+@@ -49,7 +49,7 @@ static const char* MainPanel_getValue(Panel* this, int i) {
+ return Process_getCommand(p);
+ }
+
+-static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
++HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
+ MainPanel* this = (MainPanel*) super;
+
+ HandlerResult result = IGNORED;
+diff --git a/MainPanel.h b/MainPanel.h
+index 2427ca3..6354744 100644
+--- a/MainPanel.h
++++ b/MainPanel.h
+@@ -48,4 +48,6 @@ void MainPanel_setState(MainPanel* this, State* state);
+
+ void MainPanel_delete(Object* object);
+
++HandlerResult MainPanel_eventHandler(Panel* super, int ch);
++
+ #endif
diff --git a/Panel.c b/Panel.c
index 986a989..e7cb440 100644
--- a/Panel.c
@@ -221,25 +245,41 @@ index 880597d..0c44936 100644
For more information and details on how to contribute to `htop` visit [htop.dev](https://htop.dev).
diff --git a/ScreenManager.c b/ScreenManager.c
-index 64af535..5d7432d 100644
+index 64af535..dc8c6f8 100644
--- a/ScreenManager.c
+++ b/ScreenManager.c
-@@ -215,10 +215,10 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
+@@ -14,6 +14,7 @@ in the source distribution for its full text.
+
+ #include "CRT.h"
+ #include "FunctionBar.h"
++#include "MainPanel.h"
+ #include "Object.h"
+ #include "ProcessList.h"
+ #include "ProvideCurses.h"
+@@ -214,14 +215,16 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
+ redraw = false;
continue;
}
- switch (ch) {
+- switch (ch) {
- case KEY_ALT('H'): ch = KEY_LEFT; break;
- case KEY_ALT('J'): ch = KEY_DOWN; break;
- case KEY_ALT('K'): ch = KEY_UP; break;
- case KEY_ALT('L'): ch = KEY_RIGHT; break;
-+ case 'h': case KEY_ALT('H'): ch = KEY_LEFT; break;
-+ case 'j': case KEY_ALT('J'): ch = KEY_DOWN; break;
-+ case 'k': case KEY_ALT('K'): ch = KEY_UP; break;
-+ case 'l': case KEY_ALT('L'): ch = KEY_RIGHT; break;
- }
+- }
redraw = true;
if (Panel_eventHandlerFn(panelFocus)) {
-@@ -251,7 +251,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
++ if (Panel_eventHandlerFn(panelFocus) != MainPanel_eventHandler) {
++ switch (ch) {
++ case 'h': case KEY_ALT('H'): ch = KEY_LEFT; break;
++ case 'j': case KEY_ALT('J'): ch = KEY_DOWN; break;
++ case 'k': case KEY_ALT('K'): ch = KEY_UP; break;
++ case 'l': case KEY_ALT('L'): ch = KEY_RIGHT; break;
++ }
++ }
+ result = Panel_eventHandler(panelFocus, ch);
+ }
+ if (result & SYNTH_KEY) {
+@@ -251,7 +254,7 @@ void ScreenManager_run(ScreenManager* this, Panel** lastFocus, int* lastKey) {
continue;
}
case KEY_LEFT:
@@ -248,7 +288,7 @@ index 64af535..5d7432d 100644
if (this->panelCount < 2) {
goto defaultHandler;
}
-@@ -272,7 +272,7 @@ tryLeft:
+@@ -272,7 +275,7 @@ tryLeft:
break;
case KEY_RIGHT: