]> git.rmz.io Git - dotfiles.git/commit
nvim: only switch terminal to insert mode if it is focused
authorSamir Benmendil <me@rmz.io>
Wed, 17 Jan 2024 23:09:49 +0000 (23:09 +0000)
committerSamir Benmendil <me@rmz.io>
Wed, 21 Feb 2024 01:26:30 +0000 (01:26 +0000)
commit054d29207b5cfb9faa4e51ab73e3fc24817658e1
treeccf26933ad379085d10b05dd82c96379d557d93f
parent442f99c7e99107502b4d3c732f12e538719fbd81
nvim: only switch terminal to insert mode if it is focused

A terminal may be opened in a floating window, but the insert command
would be applied to the current window.

This was an issue with neotest and nvim-dap, where in some instance it
would switch to insert mode.

See https://github.com/nvim-neotest/neotest/issues/2#issuecomment-1149532666
vim/plugin/terminal.vim