Closed shanesmith closed 1 week ago
This is fantastic and was also on my list to look at. Thanks!
There was some confusion due to lcd not working right which caused me to make the change. I think it related to the browser not getting updated on tab switch.
The following code path effectively turned any
lcd
ortcd
into acd
.lcd
(ortcd
) from nvimDirChanged
autocmd from NvimView.swift.dirchanged
event.cwdChanged
subscribeToNvimViewEvents()
in MainWindow.swiftcwdChanged()
in MainWindow+Delegates.swift.cd
typedReduce()
in MainWindowReducer.swiftstate.cwdToSet
subscribeToStateChange()
in MainWindow.swiftself.neoVimView.cwd
var cwd
setter in NvimView.swiftnvimSetCurrentDir()
which sets global nvim cwdThis chain had to be broken somewhere. The
state.cwdToSet
line in MainWindowReducer.swift has a comment that it's set to "ensure updates also send to tab bar". To fix we remove that line and instead set the tab bar cwd earlier in the cahin in NvimView+UiBridge.swift.I don't normally use the custom tab bar or file browser, but have tested them with this change and they seem to still work well.
Fixes #1027