]> git.wh0rd.org Git - nano.git/commitdiff
in save_history(), properly save history when in view mode
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 21 May 2005 22:41:23 +0000 (22:41 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 21 May 2005 22:41:23 +0000 (22:41 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2530 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/files.c

index 021252a6e586c44cd123593918eb931eded5b807..d0d3cfbd08d034fcc71aab4d17a9cb2c33c30f97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -43,6 +43,8 @@ CVS code -
   do_browser()
        - Don't treat NANO_CANCEL_KEY as NANO_EXIT_KEY anymore, for
          consistency. (DLR)
+  save_history()
+       - Properly save history when in view mode. (DLR)
 - global.c:
   shortcut_init()
        - Move the "Refresh" and "Exit" shortcuts to the beginning of
index 43d5eb0c05220be9f24e1fd6188f3e3d66e62eeb..bd5ebb88ed0ae14b22b2f6b4e82f1df6dc6912a8 100644 (file)
@@ -2912,8 +2912,8 @@ void save_history(void)
     char *nanohist;
 
     /* Don't save unchanged or empty histories. */
-    if ((search_history.count == 0 && replace_history.count == 0) ||
-       !ISSET(HISTORY_CHANGED) || ISSET(VIEW_MODE))
+    if (!ISSET(HISTORY_CHANGED) || (search_history.count == 0 &&
+       replace_history.count == 0))
        return;
 
     nanohist = histfilename();