mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-07 13:08:17 +00:00
Fix seek undo and make s.. push in the undo history
This commit is contained in:
parent
8675e324ac
commit
5a5ab2693b
@ -402,6 +402,7 @@ static int cmd_seek(void *data, const char *input) {
|
||||
;
|
||||
}
|
||||
r_core_seek_base (core, input);
|
||||
r_io_sundo_push (core->io, core->offset, r_print_get_cursor (core->print));
|
||||
break;
|
||||
case 'j': // "sj"
|
||||
{
|
||||
|
@ -44,6 +44,10 @@ R_API RIOUndos *r_io_sundo(RIO *io, ut64 offset) {
|
||||
undo->cursor = 0;
|
||||
}
|
||||
|
||||
// hack to fix undo seek
|
||||
if (io->undo.redos == 0) {
|
||||
io->undo.idx--;
|
||||
}
|
||||
io->undo.idx = (io->undo.idx - 1 + R_IO_UNDOS) % R_IO_UNDOS;
|
||||
io->undo.undos--;
|
||||
io->undo.redos++;
|
||||
|
Loading…
Reference in New Issue
Block a user