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
master
David Lawrence Ramsey 2005-05-21 22:41:23 +00:00
parent 86ce3903f9
commit 30f164a015
2 changed files with 4 additions and 2 deletions

View File

@ -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

View 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();