Skip to content

Conversation

@AndresYague
Copy link

This longer PR has the main goal of respecting the window layout when switching worktrees. Instead of trying to just update the current buffer, it will go to every open window and attempt to update the buffer there to the new worktree. If only some buffers can be updated, then those windows will be kept open while the others will be closed. If no buffer can be updated, then update_change_on_command will be called.

An additional behavior is to both open new buffers and delete all buffers that do not correspond to the current worktree. If working with buffers, this eliminates the confusion of which buffer belongs to which worktree.

Finally, the use of the api is modernized to vim.uv instead of vim.loop.

That is, for each open window, there will be an attempt to update the
buffer, if no buffer is found, then the update_on_change_command is used
instead. This will respect the window layout as much as possible when
changing workspace.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant