history: remember the commands that were executed during this session

Signed-off-by: Marco Diego Aurélio Mesquita <marcodiegomesquita@gmail.com>
This commit is contained in:
Marco Diego Aurélio Mesquita
2017-09-05 23:10:54 -03:00
committed by Benno Schulenberg
parent 4aec1649f5
commit c8363a0d0b
4 changed files with 30 additions and 7 deletions

View File

@@ -1081,7 +1081,7 @@ void do_insertfile(void)
#endif
MINSERTFILE, given,
#ifndef DISABLE_HISTORIES
NULL,
execute ? &execute_history : NULL,
#endif
edit_refresh, msg,
#ifndef DISABLE_OPERATINGDIR
@@ -1144,6 +1144,7 @@ void do_insertfile(void)
#endif
/* Save the command's output in the current buffer. */
execute_command(answer);
update_history(&execute_history, answer);
#ifdef ENABLE_MULTIBUFFER
/* If this is a new buffer, put the cursor at the top. */