aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ui.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r--src/nvim/ui.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c
index 8888535878..316342c028 100644
--- a/src/nvim/ui.c
+++ b/src/nvim/ui.c
@@ -384,6 +384,12 @@ void ui_attach_impl(UI *ui, uint64_t chanid)
ui_refresh_options();
resettitle();
+ char cwd[MAXPATHL];
+ size_t cwdlen = sizeof(cwd);
+ if (uv_cwd(cwd, &cwdlen) == 0) {
+ ui_call_chdir((String){ .data = cwd, .size = cwdlen });
+ }
+
for (UIExtension i = kUIGlobalCount; (int)i < kUIExtCount; i++) {
ui_set_ext_option(ui, i, ui->ui_ext[i]);
}