nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 02376103eb5660c91dc64e9d8c057bba82bfe914
parent 999d99c6e48587a2416e34a980d375bfe9706492
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Sun,  9 Apr 2017 16:30:38 -0500

bindings: use arrows instead of words for search history too

When UTF-8 is available, use actual arrows instead of untranslated words
to indicate the cursor keys in the search history, as is done elsewhere.

Diffstat:
Msrc/global.c | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/src/global.c b/src/global.c @@ -1228,9 +1228,17 @@ void shortcut_init(void) add_to_sclist(MGOTOLINE, "^T", 0, gototext_void, 0); #ifndef DISABLE_HISTORIES add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "^P", 0, get_history_older_void, 0); - add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "Up", KEY_UP, get_history_older_void, 0); add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "^N", 0, get_history_newer_void, 0); - add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "Down", KEY_DOWN, get_history_newer_void, 0); +#ifdef ENABLE_UTF8 + if (using_utf8()) { + add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "\xE2\x86\x91", KEY_UP, get_history_older_void, 0); + add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "\xE2\x86\x93", KEY_DOWN, get_history_newer_void, 0); + } else +#endif + { + add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "Up", KEY_UP, get_history_older_void, 0); + add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE, "Down", KEY_DOWN, get_history_newer_void, 0); + } #endif #ifndef DISABLE_BROWSER add_to_sclist(MWHEREISFILE, "^Y", 0, do_first_file, 0);