From: David Lawrence Ramsey Date: Sat, 21 May 2005 22:41:23 +0000 (+0000) Subject: in save_history(), properly save history when in view mode X-Git-Tag: v1.3.8~273 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=30f164a015faccfc0757dcd3ed4bda49bff19167;p=nano.git 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 --- diff --git a/ChangeLog b/ChangeLog index 021252a6..d0d3cfbd 100644 --- 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 diff --git a/src/files.c b/src/files.c index 43d5eb0c..bd5ebb88 100644 --- a/src/files.c +++ b/src/files.c @@ -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();