akinsho / toggleterm.nvim

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

fix: ensure `on_choice` operates on exact `items` element #566

Closed echasnovski closed 3 months ago

echasnovski commented 3 months ago

As on_choice() actions depend on modifying terminal objects in place, make sure to operate on exact element and not a copy. As users can override vim.ui.select(), its implementation might return an item's copy (which is not explicitly prohibited) making later on_choice() actions not 100% full proof.