diff options
author | Chet Ramey <chet.ramey@case.edu> | 2020-02-07 15:18:41 -0500 |
---|---|---|
committer | Chet Ramey <chet.ramey@case.edu> | 2020-02-07 15:18:41 -0500 |
commit | 8b6524c482573ea12eb20be756cdb8ca31d945f3 (patch) | |
tree | db2dfe353344050dba07dff77391d0792988b105 /bashline.c | |
parent | f747f9ff4c8aed2d51fa54db3cb10e8118034753 (diff) | |
download | bash-8b6524c482573ea12eb20be756cdb8ca31d945f3.tar.gz |
Bash-5.0 patch 14: edit-and-execute-command does not handle empty command lines
Diffstat (limited to 'bashline.c')
-rw-r--r-- | bashline.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -961,11 +961,8 @@ edit_and_execute_command (count, c, editing_mode, edit_command) /* This breaks down when using command-oriented history and are not finished with the command, so we should not ignore the last command */ using_history (); - if (rl_line_buffer[0]) - { - current_command_line_count++; /* for rl_newline above */ - bash_add_history (rl_line_buffer); - } + current_command_line_count++; /* for rl_newline above */ + bash_add_history (rl_line_buffer); current_command_line_count = 0; /* for dummy history entry */ bash_add_history (""); history_lines_this_session++; |