aboutsummaryrefslogtreecommitdiff
path: root/bb.c
diff options
context:
space:
mode:
Diffstat (limited to 'bb.c')
-rw-r--r--bb.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bb.c b/bb.c
index 5587960..2a5ee44 100644
--- a/bb.c
+++ b/bb.c
@@ -683,8 +683,11 @@ bb_result_t process_cmd(bb_t *bb, const char *cmd)
case 'd': { // +deselect:, +dotfiles:
switch (cmd[1]) {
case 'e': { // +deselect:
- if (!value && !bb->nfiles) return BB_INVALID;
- if (!value) value = bb->files[bb->cursor]->fullname;
+ if (!value) {
+ while (bb->firstselected)
+ set_selected(bb, bb->firstselected, 0);
+ return BB_OK;
+ }
char pbuf[PATH_MAX];
normalize_path(bb->path, value, pbuf, 1);
entry_t *e = load_entry(bb, pbuf, 0);