mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-21 09:30:55 +00:00
debugger - don't add history line if it's identical to previous line
This commit is contained in:
parent
84ff99c177
commit
b1d647d695
@ -1307,8 +1307,10 @@ void Shell()
|
||||
}
|
||||
}
|
||||
|
||||
// todo -- don't add if same as previous command.
|
||||
add_history(cp);
|
||||
// don't add if same as previous entry.
|
||||
HIST_ENTRY *he = current_history();
|
||||
if (he == nullptr || strcmp(he->line, cp) != 0)
|
||||
add_history(cp);
|
||||
}
|
||||
free(cp);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user