[prev in list] [next in list] [prev in thread] [next in thread]
List: nano-devel
Subject: [Nano-devel] Home and End in the file browser
From: Benno Schulenberg <bensberg () justemail ! net>
Date: 2014-06-26 17:51:56
Message-ID: 1403805116.25241.134921297.69B91364 () webmail ! messagingengine ! com
[Download RAW message or body]
Hi all,
Currently the keys <Home> and <End> do nothing in Nano's file
broswer. In Pico's file browser those keys go to the head and
the tail of the list. In Nano we already have M-\ and M-/ for
that, and I think it would be more consistent if <Home> and <End>
would move only horizontally. So I would propose those keys to
move the selector to the first and the last column on the current
line. See attached patch. Any thoughts, comments?
Benno
--
http://www.fastmail.fm - A fast, anti-spam email service.
["browser-home-end.patch" (browser-home-end.patch)]
Index: src/browser.c
===================================================================
--- src/browser.c (revision 5020)
+++ src/browser.c (working copy)
@@ -282,12 +282,18 @@
} else if (f->scfunc == do_left) {
if (selected > 0)
selected--;
+ } else if (f->scfunc == do_home) {
+ selected -= (selected % width);
} else if (f->scfunc == do_down_void) {
if (selected + width <= filelist_len - 1)
selected += width;
} else if (f->scfunc == do_right) {
if (selected < filelist_len - 1)
selected++;
+ } else if (f->scfunc == do_end) {
+ selected += width - (selected % width) - 1;
+ if (selected >= filelist_len - 1)
+ selected = filelist_len - 1;
} else if (f->scfunc == do_enter_void) {
/* We can't move up from "/". */
if (strcmp(filelist[selected], "/..") == 0) {
_______________________________________________
Nano-devel mailing list
Nano-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/nano-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic