From b349c80f0d78921d2b4815749b67383166e2517d Mon Sep 17 00:00:00 2001
From: David Lawrence Ramsey <pooka109@gmail.com>
Date: Thu, 17 Mar 2005 19:10:29 +0000
Subject: [PATCH] allow refreshing of the file browser window, as Pico does

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2388 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
---
 ChangeLog    | 3 +++
 src/files.c  | 5 +++++
 src/global.c | 4 ++++
 3 files changed, 12 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 97fff99e..c06bf6e4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -203,6 +203,9 @@ CVS code -
 	- Remove unneeded NANO_SMALL #ifdef, so that it's included
 	  whenever its prototype is, and so it can compile when
 	  DISABLE_OPERATINGDIR isn't defined and NANO_SMALL is. (DLR)
+  do_browser()
+	- Refresh the screen when Ctrl-L is pressed in the file browser,
+	  as Pico does. (DLR)
 - global.c:
   shortcut_init()
 	- Fix misplaced #endif keeping the "Full Justify" shortcut in
diff --git a/src/files.c b/src/files.c
index f0b99de5..54546896 100644
--- a/src/files.c
+++ b/src/files.c
@@ -2584,6 +2584,11 @@ char *do_browser(char *path, DIR *dir)
 		free_charptrarray(filelist, numents);
 		goto change_browser_directory;
 
+	    /* Refresh the screen. */
+	    case NANO_REFRESH_KEY:
+		total_update();
+		break;
+
 	    /* Go to a specific directory. */
 	    case NANO_GOTOLINE_KEY:
 	    case NANO_GOTOLINE_FKEY:
diff --git a/src/global.c b/src/global.c
index 53f13bc9..fd84b83e 100644
--- a/src/global.c
+++ b/src/global.c
@@ -1002,6 +1002,10 @@ void shortcut_init(bool unjustify)
 	IFHELP(nano_nextpage_msg, NANO_NO_KEY), NANO_NEXTPAGE_FKEY,
 	NANO_NO_KEY, VIEW, NULL);
 
+    sc_init_one(&browser_list, NANO_REFRESH_KEY, N_("Refresh"),
+	IFHELP(nano_refresh_msg, NANO_NO_KEY), NANO_NO_KEY,
+	NANO_NO_KEY, VIEW, NULL);
+
     /* Translators: try to keep this string under 22 characters long */
     sc_init_one(&browser_list, NANO_GOTOLINE_KEY, N_("Go To Dir"),
 	IFHELP(nano_gotodir_msg, NANO_GOTOLINE_ALTKEY),
-- 
GitLab