1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-10-26 17:59:08 +03:00
vimr/NvimView
Shane Smith 0c0a215202 Fix lcd/tcd
The following code path effectively turned any `lcd` or `tcd` into a
`cd`.

- `lcd` (or `tcd`) from nvim
- handled by `DirChanged` autocmd from NvimView.swift
- fires `.dirchanged` event
- handled by autoCommandEvent() in NvimView+UiBridge.swift
- calls cwdChanged() in NvimView+UiBridge.swift
- fires event `.cwdChanged`
- handled by `subscribeToNvimViewEvents()` in MainWindow.swift
- calls `cwdChanged()` in MainWindow+Delegates.swift
- fires even `.cd`
- handled by `typedReduce()` in MainWindowReducer.swift
- sets `state.cwdToSet`
- state change handled by `subscribeToStateChange()` in MainWindow.swift
- sets `self.neoVimView.cwd`
- handled by `var cwd` setter in NvimView.swift
- calls `nvimSetCurrentDir()` which sets global nvim cwd

This 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
2024-06-29 21:24:44 -04:00
..
Sources/NvimView Fix lcd/tcd 2024-06-29 21:24:44 -04:00
Support Update deps 2024-04-26 14:27:46 +02:00
Tests/NvimViewTests Fix RxNeovimApi example 2023-12-23 20:55:42 +01:00
.gitignore Restructure a bit 2020-12-24 12:15:36 +01:00
Package.swift Update deps 2024-04-26 14:27:46 +02:00
README.md Make NvimView build 2020-08-17 23:28:24 +02:00

NvimView

A description of this package.