nano

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

commit 07c1ac903597bc02caa4570a4a5bc5283fcf2aa8
parent 2b9c0c57241eb55c5cb8a7ba3e0e376cb3af0d6a
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat,  4 Jul 2020 17:14:52 +0200

tweaks: delete two functions that are never executed

Those two operations are performed directly in do_browser().

Diffstat:
Msrc/browser.c | 12------------
Msrc/global.c | 6++++++
Msrc/prototypes.h | 4++--
3 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/src/browser.c b/src/browser.c @@ -749,18 +749,6 @@ void do_fileresearch(bool forwards) findfile(last_search, forwards); } -/* Select the first file in the list. */ -void to_first_file(void) -{ - selected = 0; -} - -/* Select the last file in the list. */ -void to_last_file(void) -{ - selected = filelist_len - 1; -} - /* Strip one element from the end of path, and return the stripped path. * The returned string is dynamically allocated, and should be freed. */ char *strip_last_component(const char *path) diff --git a/src/global.c b/src/global.c @@ -298,6 +298,12 @@ void flip_goto(void) void to_files(void) { } +void to_first_file(void) +{ +} +void to_last_file(void) +{ +} void goto_dir(void) { } diff --git a/src/prototypes.h b/src/prototypes.h @@ -194,8 +194,6 @@ void browser_refresh(void); void browser_select_dirname(const char *needle); void do_filesearch(bool forwards); void do_fileresearch(bool forwards); -void to_first_file(void); -void to_last_file(void); char *strip_last_component(const char *path); #endif @@ -654,6 +652,8 @@ void flip_replace(void); void flip_goto(void); #ifdef ENABLE_BROWSER void to_files(void); +void to_first_file(void); +void to_last_file(void); void goto_dir(void); #endif #ifndef NANO_TINY