summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/tagtree.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/apps/tagtree.c b/apps/tagtree.c
index 0aa1de5673..ea2a756a46 100644
--- a/apps/tagtree.c
+++ b/apps/tagtree.c
@@ -1905,7 +1905,16 @@ int tagtree_enter(struct tree_context* c, bool is_visible)
1905 } 1905 }
1906 table_history[c->dirlevel] = c->currtable; 1906 table_history[c->dirlevel] = c->currtable;
1907 extra_history[c->dirlevel] = c->currextra; 1907 extra_history[c->dirlevel] = c->currextra;
1908 c->dirlevel++; 1908
1909 if (c->dirlevel + 1 < MAX_DIR_LEVELS)
1910 {
1911 c->dirlevel++;
1912 /*DEBUGF("Tagtree depth %d\n", c->dirlevel);*/
1913 }
1914 else
1915 {
1916 DEBUGF("Tagtree depth exceeded\n");
1917 }
1909 1918
1910 /* lock buflib for possible I/O to protect dptr */ 1919 /* lock buflib for possible I/O to protect dptr */
1911 tree_lock_cache(c); 1920 tree_lock_cache(c);
@@ -2058,7 +2067,15 @@ void tagtree_exit(struct tree_context* c, bool is_visible)
2058 } 2067 }
2059 c->dirfull = false; 2068 c->dirfull = false;
2060 if (c->dirlevel > 0) 2069 if (c->dirlevel > 0)
2070 {
2061 c->dirlevel--; 2071 c->dirlevel--;
2072 /*DEBUGF("Tagtree depth %d\n", c->dirlevel);*/
2073 }
2074 else
2075 {
2076 DEBUGF("Tagtree nothing to exit\n");
2077 }
2078
2062 if (is_visible) 2079 if (is_visible)
2063 c->selected_item = selected_item_history[c->dirlevel]; 2080 c->selected_item = selected_item_history[c->dirlevel];
2064 c->currtable = table_history[c->dirlevel]; 2081 c->currtable = table_history[c->dirlevel];