Skip to content

Check if the user is in the side window when deleting/renaming#39

Open
gorbit99 wants to merge 2 commits intonvzone:mainfrom
gorbit99:main
Open

Check if the user is in the side window when deleting/renaming#39
gorbit99 wants to merge 2 commits intonvzone:mainfrom
gorbit99:main

Conversation

@gorbit99
Copy link
Copy Markdown

@gorbit99 gorbit99 commented Apr 3, 2026

I've noticed, that the way "get_buf_on_cursor" was implemented, it didn't care if the currently active window was the side window. This PR adds a check for this and returns nil otherwise.

Additionally I added in a failsafe to "edit_name" and "delete_term". Previously if these were triggered from the terminal window (and not from the side window), the above bug caused the wrong terminal to be renamed/deleted. I've added a helper function that either returns the selected row if the user is in the side window, or the currently active terminal.

I wanted to control the plugin entirely from the terminal window, never exiting to the sidebar, that's how I ran into this issue.

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