diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-05 17:13:33 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-03-05 17:13:33 -0500 |
commit | 87fe34bdbaa2d840d5d4e988ffd789eb3e7a039a (patch) | |
tree | 8375a985f55e8b5dbbd72f161cbc34111a8fd957 /ui.c | |
parent | edbad154a65f47dc77dbb901801651e28c4f5e55 (diff) |
cd to last file selector directory
Diffstat (limited to 'ui.c')
-rw-r--r-- | ui.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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); } |