mirror of
https://github.com/radareorg/radare2.git
synced 2024-10-09 03:43:28 +00:00
Fix to always save history when exiting
When exiting radare by using ctrl+d or due to null stdin read it doesnt save history as expected. Actually it was only saving when exiting using 'q'.
This commit is contained in:
parent
9503e8506a
commit
53a554f358
@ -767,6 +767,7 @@ int main(int argc, char **argv, char **envp) {
|
||||
prj = r_config_get (r.config, "file.project");
|
||||
if (prj && *prj && r_cons_yesno ('y', "Do you want to save the project? (Y/n)"))
|
||||
r_core_project_save (&r, prj);
|
||||
r_line_hist_save (R2_HOMEDIR"/history");
|
||||
} else {
|
||||
// r_core_project_save (&r, prj);
|
||||
if (debug) {
|
||||
|
@ -19,12 +19,10 @@ static int cmd_quit(void *data, const char *input) {
|
||||
return -2;
|
||||
case '\0':
|
||||
core->num->value = 0LL;
|
||||
r_line_hist_save (R2_HOMEDIR"/history");
|
||||
return -2;
|
||||
default:
|
||||
if (*input == ' ')
|
||||
input++;
|
||||
r_line_hist_save (R2_HOMEDIR"/history");
|
||||
if (*input)
|
||||
r_num_math (core->num, input);
|
||||
else core->num->value = 0LL;
|
||||
|
Loading…
Reference in New Issue
Block a user