nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 30f164a015faccfc0757dcd3ed4bda49bff19167
parent 86ce3903f9b6e0ce9940003b665575062af8af62
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Sat, 21 May 2005 22:41:23 +0000

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

Diffstat:
MChangeLog | 2++
Msrc/files.c | 4++--
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git 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 @@ -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();