From 87fe34bdbaa2d840d5d4e988ffd789eb3e7a039a Mon Sep 17 00:00:00 2001 From: Leo Tenenbaum Date: Fri, 5 Mar 2021 17:13:33 -0500 Subject: cd to last file selector directory --- ui.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui.c b/ui.c index 58fd94e..62015ee 100644 --- a/ui.c +++ b/ui.c @@ -96,7 +96,6 @@ static char *selector_update(Ted *ted, Selector *s) { float scroll_speed = 2.5f; s->scroll += scroll_speed * (float)ted->scroll_total_y; selector_clamp_scroll(ted, s); - return ret; } @@ -468,6 +467,8 @@ static char *file_selector_update(Ted *ted, FileSelector *fs) { } free(files); + // set cwd to this (if no buffers are open, the "open" menu should use the last file selector's cwd) + strbuf_cpy(ted->cwd, cwd); } else { ted_seterr(ted, "Couldn't list directory '%s'.", cwd); } -- cgit v1.2.3