]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/top.c
Don't truncate the history file when history size is unlimited
[thirdparty/binutils-gdb.git] / gdb / top.c
index 74e1e071370ef83de766a9b46fe097cd033b0a3c..f8f926b62d4a5cabcbf58cd3c52de3a1fd92b4fd 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -941,7 +941,8 @@ gdb_safe_append_history (void)
       else
        {
          append_history (command_count, local_history_filename);
-         history_truncate_file (local_history_filename, history_max_entries);
+         if (history_is_stifled ())
+           history_truncate_file (local_history_filename, history_max_entries);
        }
 
       ret = rename (local_history_filename, history_filename);