You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because terminal buffers are 'nomodifiable' clearing the commandline after we have extracted the command is a bit of a hack.
The only way I've found that works is to have the keypresses required directly inside of the mapping (or having them inside a macro which is called directly from the mapping).
Extracting them into their own function does not work.
execute 'normal!...' does not work.
'feedkeys()' cannot be used because it does not run till the script has completed.
If we had the job id of the terminal then we could do call jobsend(id, "^C") but I'm unsure if terminals started using :terminal even get a job id.
call termopen('/usr/local/bin/fish') does return a job id so it could be used but then users would need to start their terminals via my plugin somehow, currently the plugin works regardless of how the terminal was started.
The text was updated successfully, but these errors were encountered:
I've created https://github.com/brettanomyces/nvim-terminus which uses job control to implement similar functionality to this plugin, without the hack. Unfortunately it requires the user to open the terminal using a command provided by the plugin so its a bit of a tradeoff
Because terminal buffers are 'nomodifiable' clearing the commandline after we have extracted the command is a bit of a hack.
The only way I've found that works is to have the keypresses required directly inside of the mapping (or having them inside a macro which is called directly from the mapping).
Extracting them into their own function does not work.
execute 'normal!...' does not work.
'feedkeys()' cannot be used because it does not run till the script has completed.
If we had the job id of the terminal then we could do
call jobsend(id, "^C")
but I'm unsure if terminals started using:terminal
even get a job id.call termopen('/usr/local/bin/fish')
does return a job id so it could be used but then users would need to start their terminals via my plugin somehow, currently the plugin works regardless of how the terminal was started.The text was updated successfully, but these errors were encountered: