diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2023-10-15 02:12:29 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2023-10-15 02:12:29 -0400 |
| commit | 9147b35b84553af718bc3a5281c0bd68badb630a (patch) | |
| tree | fe531f32e249d66fdd51e624400388316591fe19 | |
| parent | 03f0c2ad987c6971a546a4617c7d976d92e79d80 (diff) | |
Deselect nonexistent files after commands are run
| -rw-r--r-- | bb.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -364,6 +364,12 @@ static void handle_next_key_binding(bb_t *bb) fputs("\033[K", tty_out); restore_term(&orig_termios); run_script(bb, binding->script); + for (entry_t *next, *e = bb->selected; e; e = next) { + next = e->selected.next; + struct stat buf; + if (stat(e->fullname, &buf) != 0) + set_selected(bb, e, 0); + } init_term(); set_title(bb); check_cmdfile(bb); |
