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

Add terminal mode support #3

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

Conversation

vais
Copy link

@vais vais commented Feb 17, 2025

Currently the plugin does not work in vim's built-in :terminal buffers. These changes make it so it does.

call feedkeys(":echo\<CR>", 'nt')
" Clear the -- RESIZE -- message
echo ''
redraw
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why this didn't work for you before, but the direct way works fine for me now in vim 9.1 (and this fixes an issue that the current implementation causes in terminal mode)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I were the author or maintainer, I would find this change a lot easier to review if your cover letter (PR description) or commit message explained what problem exists in terminal buffers and how these changes resolve it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main problem is the absence of mappings for terminal mode, i.e. the plugin simply does noting in terminal mode.

The secondary problem (once the mappings for terminal mode are created), is that the above code for clearing the -- RESIZE -- status message dumps the text :echo into the terminal buffer instead of doing what it was intending to do.

Hope this helps clarify the issue ❤️

@sedm0784
Copy link
Owner

Thank you for this! (And sorry for the slow response. I don't log into GitHub all that frequently as you can probably tell from my commit graph.)

I'm not going to merge it in as is, because I'd like the plugin to continue working in all the versions/contexts in which it worked before, and the removal of the feedkeys() will break this. When I get a chance though, I'll make a tweak to the feedkeys arguments while in terminal mode so that they are not simply entered into whatever's running in the terminal and instead sent to Vim correctly.

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.

3 participants