akinsho / toggleterm.nvim

A neovim lua plugin to help easily manage multiple terminal windows
GNU General Public License v3.0
4.21k stars 170 forks source link

Fix: wrongly sending prior keypresses when opening float terminal+changingdirectory #529

Closed coatsandhats closed 8 months ago

coatsandhats commented 8 months ago

Terminal would fail to switch directory because of sending prior key presses behind the 'cd ~/example', failing to change directory because it would run command '321k33cd ~/example' or fail to enter the command at all.

Changed fn.chansend to vim.api.nvim_chan_send. Fixed issue on my system.

I noticed this when quickswitching to another buffer using Telescope in a toggleterm float when escaped from the terminal

-Persist mode was enabled -Windows Terminal