summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2009-04-19 13:02:02 +0200
committerYorhel <git@yorhel.nl>2009-04-19 13:02:02 +0200
commit44f64cf3d3fb8a5cc8589640b7ca0054250c7e53 (patch)
tree43f2c803ed54db79576190bd12a5c9a9e1e912cd
parentbb8c2e66e7c20e711fd2266854c27e47a1d6cafa (diff)
Go the correct directory after a deletion
-rw-r--r--src/delete.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/delete.c b/src/delete.c
index cfdd086..0cf6fcc 100644
--- a/src/delete.c
+++ b/src/delete.c
@@ -229,13 +229,15 @@ int delete_dir(struct dir *dr) {
void delete_process() {
- struct dir *n = root->parent;
+ struct dir *n;
/* confirm */
seloption = 1;
while(state == DS_CONFIRM && !noconfirm)
if(input_handle(0))
return browse_init(root);
+ n = root->parent->sub != root ? root->parent->sub : root->next ? root->next : root->parent;
+
/* delete */
lastupdate = 999;
seloption = 0;