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

Bugfix: toggleterm.send_lines_to_terminal wasn't passing id to M.exec() when trim_spaces = false #541

Closed amsesk closed 7 months ago

amsesk commented 7 months ago

This pull request simply adds id to the arguments passed to M.exec() when trim_spaces = false in toggleterm.send_lines_to_terminal.

This wasn't causing issues for the various user commands (e.g., ToggleTermSendCurrentLine) because they all set trim_spaces = true.

It was causing issues for implementations that call send_lines_to_terminal with trim_spaces = true that tried sending text to terminals other than the first terminal, where term.id != 1; Text was always sent to the first terminal.