Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(output_panel): recreate window and term channel if panel closed manually #477

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

YaroSpace
Copy link

A fix for 2 issues that appear if output_panel is closed by the user manually and not with output_pannel.toggle/close():

  1. The buffer id for output panel becomes invalid, so there is an error when trying to open the panel again. Currently the check with vim.fn.bufexists() does not catch buffers that exist, but are unloaded. Fix - recreate the buffer.
  2. The channel id for term bound to panel buffer becomes invalid, so there is an error when trying to write to that channel. Fix - recreate the term.

Also, a fix with associated issue: if you reaload the plugin with say Lazy reload neotest, the old panel buffer still exists, so when a new buffer is created with the same name, there is an error of trying to rename existing buffer. Fix - delete buffer with the same name, when ceating a new one.

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