Adjust the patches for fzy-1.0 - pkgsrc-localpatches - leot's pkgsrc LOCALPATCHES
(HTM) hg clone https://bitbucket.org/iamleot/pkgsrc-localpatches
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) changeset 2e46b16e100f8f726c97089ce24e634e486bc5e9
(DIR) parent 0d79cf35fe90df0a8552c786a79f4fd41273117b
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Mon, 24 Sep 2018 16:00:20
Adjust the patches for fzy-1.0
Diffstat:
misc/fzy/patch-config.h | 5 ++++-
misc/fzy/patch-src_tty_interface.c | 16 +++++++++-------
2 files changed, 13 insertions(+), 8 deletions(-)
---
diff -r 0d79cf35fe90 -r 2e46b16e100f misc/fzy/patch-config.h
--- a/misc/fzy/patch-config.h Wed Sep 19 02:47:06 2018 +0200
+++ b/misc/fzy/patch-config.h Mon Sep 24 16:00:20 2018 +0200
@@ -1,6 +1,6 @@
--- /dev/null 2016-08-12 00:34:04.402861959 +0200
+++ config.h 2016-08-12 00:37:16.495787458 +0200
-@@ -0,0 +1,10 @@
+@@ -0,0 +1,13 @@
+#define TTY_COLOR_HIGHLIGHT TTY_COLOR_NORMAL
+
+#define SCORE_GAP_LEADING -0.005
@@ -11,3 +11,6 @@
+#define SCORE_MATCH_WORD 0.8
+#define SCORE_MATCH_CAPITAL 0.7
+#define SCORE_MATCH_DOT 0.6
++
++/* Time (in ms) to wait for additional bytes of an escape sequence */
++#define KEYTIMEOUT 25
diff -r 0d79cf35fe90 -r 2e46b16e100f misc/fzy/patch-src_tty_interface.c
--- a/misc/fzy/patch-src_tty_interface.c Wed Sep 19 02:47:06 2018 +0200
+++ b/misc/fzy/patch-src_tty_interface.c Mon Sep 24 16:00:20 2018 +0200
@@ -2,9 +2,9 @@
Add support to go to the top and bottom like dmenu.
---- src/tty_interface.c.orig 2017-04-17 07:55:42.000000000 +0000
+--- src/tty_interface.c.orig 2018-09-23 22:05:55.000000000 +0000
+++ src/tty_interface.c
-@@ -169,6 +169,18 @@ static void action_pagedown(tty_interfac
+@@ -224,6 +224,18 @@ static void action_pagedown(tty_interfac
choices_next(state->choices);
}
@@ -23,12 +23,14 @@
static void action_autocomplete(tty_interface_t *state) {
update_state(state);
const char *current_selection = choices_get(state->choices, state->choices->selection);
-@@ -229,6 +241,8 @@ static const keybinding_t keybindings[]
+@@ -292,8 +304,8 @@ static const keybinding_t keybindings[]
{KEY_CTRL('N'), action_next}, /* C-N */
- {KEY_CTRL('K'), action_prev}, /* C-J */
- {KEY_CTRL('J'), action_next}, /* C-K */
+ {KEY_CTRL('K'), action_prev}, /* C-K */
+ {KEY_CTRL('J'), action_next}, /* C-J */
+- {KEY_CTRL('A'), action_beginning}, /* C-A */
+- {KEY_CTRL('E'), action_end}, /* C-E */
+ {KEY_CTRL('A'), action_top}, /* C-A */
+ {KEY_CTRL('E'), action_bottom}, /* C-E */
- {"\x1b[A", action_prev}, /* UP */
- {"\x1bOA", action_prev}, /* UP */
+ {"\x1bOD", action_left}, /* LEFT */
+ {"\x1b[D", action_left}, /* LEFT */