summaryrefslogtreecommitdiff
path: root/alpine
diff options
context:
space:
mode:
authorEduardo Chappa <chappa@washington.edu>2020-06-28 14:06:25 -0600
committerEduardo Chappa <chappa@washington.edu>2020-06-28 14:06:25 -0600
commit8140a5ad34cd4545d87314a94a00a2b660fc441a (patch)
tree99cc9088ae5fbf79e793f73bc4e008ff550c345c /alpine
parentb19b4d666223723ff5406efe042daad899f2b9a1 (diff)
downloadalpine-8140a5ad34cd4545d87314a94a00a2b660fc441a.tar.xz
* After returning from the directory side of a dual-folder, sometimes
Alpine would return to the first folder in the parent directory or to the dual-folder. The fix is to return to the original dual-folder as intended. Reported by Holger Trapp.
Diffstat (limited to 'alpine')
-rw-r--r--alpine/folder.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/alpine/folder.c b/alpine/folder.c
index 7f33238..a391181 100644
--- a/alpine/folder.c
+++ b/alpine/folder.c
@@ -3526,8 +3526,12 @@ folder_lister_parent(FSTATE_S *fs, CONTEXT_S *context, int index, int force_pare
folder_select_preserve(context);
oldir[0] = '\0';
if((s = strrindex(context->dir->ref, context->dir->delim)) != NULL){
+ char *u, *v;
*s = '\0';
- if((s = strrindex(context->dir->ref, context->dir->delim)) != NULL){
+ u = strrindex(context->dir->ref, context->dir->delim);
+ v = strrindex(context->dir->ref, '}');
+ s = u < v ? v : u;
+ if(s != NULL){
strncpy(oldir, s+1, sizeof(oldir)-1);
oldir[sizeof(oldir)-1] = '\0';
}