Commit 30f164a0 authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

in save_history(), properly save history when in view mode

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent 86ce3903
Showing with 4 additions and 2 deletions
+4 -2
...@@ -43,6 +43,8 @@ CVS code - ...@@ -43,6 +43,8 @@ CVS code -
do_browser() do_browser()
- Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for - Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for
consistency. (DLR) consistency. (DLR)
save_history()
- Properly save history when in view mode. (DLR)
- global.c: - global.c:
shortcut_init() shortcut_init()
- Move the "Refresh" and "Exit" shortcuts to the beginning of - Move the "Refresh" and "Exit" shortcuts to the beginning of
......
...@@ -2912,8 +2912,8 @@ void save_history(void) ...@@ -2912,8 +2912,8 @@ void save_history(void)
char *nanohist; char *nanohist;
/* Don't save unchanged or empty histories. */ /* Don't save unchanged or empty histories. */
if ((search_history.count == 0 && replace_history.count == 0) || if (!ISSET(HISTORY_CHANGED) || (search_history.count == 0 &&
!ISSET(HISTORY_CHANGED) || ISSET(VIEW_MODE)) replace_history.count == 0))
return; return;
nanohist = histfilename(); nanohist = histfilename();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment