A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovim/neovim/issues/8691 below:

Cannot figure out autocmd to enter insert mode when <LeftMouse> a terminal pane? · Issue #8691 · neovim/neovim · GitHub

`nvim --version`: NVIM v0.2.2
NVIM v0.2.2
Build type: Release
LuaJIT 2.0.5
Compilation: /usr/local/Homebrew/Library/Homebrew/shims/super/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_
HAS_VAR_FROM -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-prote
ctor-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -I/tmp/neovim-20180209-92407-udkzoo/neovim-0.2.2/build/config -I/tmp/neovim-20180209-9240
7-udkzoo/neovim-0.2.2/src -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/
local/opt/gettext/include -I/usr/include -I/tmp/neovim-20180209-92407-udkzoo/neovim-0.2.2/build/src/nvim/auto -I/tmp/neovim-20180209-92407-udkzoo/neovim-0.2.2/
build/include
Compiled by brew@HighSierra.local

Features: +acl +iconv +jemalloc +tui
See ":help feature-compile"

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/local/Cellar/neovim/0.2.2_1/share/nvim"

Run :checkhealth for more info
Steps to reproduce

Use the short custom vimrc below:

cat > test-init.vim <<HERE
set mouse=a
augroup terminal
  autocmd!
  "autocmd TermOpen * setlocal nonumber norelativenumber
  autocmd TermOpen * startinsert
  autocmd FocusGained,BufEnter,BufWinEnter,WinEnter term://* startinsert
  "autocmd BufEnter * if &buftype == 'terminal' | :startinsert | endif
augroup END
HERE

nvim -u test-init.vim
:sp
:terminal
echo Hello
<C-\><C-n> " to escape from terminal mode
<C-w><C-j> " to move to non-terminal split
<LeftClick> on terminal pane
<Enter> " expecting 'echo Hello' command to run
Actual behaviour

Need to press i to enter insert mode to be able to type into the terminal after clicking.

(It seem from cursor movement like it enters insert mode and then something else happens and it immediately exits insert mode. I've no idea how to debug this, it might just be a phantom visual?)

Expected behaviour

Should be in insert mode and able to type commands immediately in the same way that you can if you use to return focus to the terminal split from the non-terminal split.

Possibly related

Not sure if #7164 is related?


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4