nano

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

commit 045664107e8ef1b4c854a3a0a6ed7b666f5d6eb8
parent e512466ff0ed853de1518b169187285dc6c7860d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 23 Apr 2025 11:50:18 +0200

tweaks: in the browser, implement M-\ and M-/ in a slightly denser way

Inspired-by: Peter Michaux <petermichaux@gmail.com>

Diffstat:
Msrc/browser.c | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/browser.c b/src/browser.c @@ -353,13 +353,13 @@ void research_filename(bool forwards) } } -/* Select the first file in the list -- called by ^W^Y. */ +/* Select the first file in the list -- called directly by ^W^Y. */ void to_first_file(void) { selected = 0; } -/* Select the last file in the list -- called by ^W^V. */ +/* Select the last file in the list -- called directly by ^W^V. */ void to_last_file(void) { selected = list_length - 1; @@ -548,10 +548,8 @@ char *browse(char *path) list_length - piles; else selected += usable_rows * piles; - } else if (function == to_first_file) { - selected = 0; - } else if (function == to_last_file) { - selected = list_length - 1; + } else if (function == to_first_file || function == to_last_file) { + function(); } else if (function == goto_dir) { /* Ask for the directory to go to. */ if (do_prompt(MGOTODIR, "", NULL,