diff options
author | Kevin McCarthy <kevin@8t8.us> | 2019-06-28 12:57:24 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2019-06-28 12:57:24 -0700 |
commit | f3ec740d1a4d4829ade7fb4298b78b274c3772b1 (patch) | |
tree | dc2b59c7c6d5934c8ce22b20d52d7692b53c1d1d | |
parent | 840b813fa27fafa7fe43e41e227a3331156c0d9b (diff) |
Don't read or save history if $history_file isn't set.
-rw-r--r-- | history.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -114,6 +114,9 @@ void mutt_read_histfile (void) char *linebuf = NULL, *p; size_t buflen; + if (!HistFile) + return; + if ((f = fopen (HistFile, "r")) == NULL) return; @@ -401,7 +404,7 @@ void mutt_history_add (history_class_t hclass, const char *s, int save) { if (option (OPTHISTREMOVEDUPS)) remove_history_dups (hclass, s); - if (save && SaveHist) + if (save && SaveHist && HistFile) save_history (hclass, s); mutt_str_replace (&h->hist[h->last++], s); if (h->last > HistSize) |