From 044f7806c27c7c4d09a21b8a2b2c11d6c2a0569d Mon Sep 17 00:00:00 2001 From: Shidong Wang Date: Thu, 27 Dec 2018 22:01:04 +0800 Subject: [PATCH] Clear cursor highlight when open terminal windows --- autoload/SpaceVim/layers/shell.vim | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/autoload/SpaceVim/layers/shell.vim b/autoload/SpaceVim/layers/shell.vim index c0c10ba79..ae9ad77a1 100644 --- a/autoload/SpaceVim/layers/shell.vim +++ b/autoload/SpaceVim/layers/shell.vim @@ -122,7 +122,18 @@ function! s:open_default_shell() abort if s:default_shell ==# 'terminal' if exists(':terminal') if has('nvim') - exe 'terminal' + terminal + " @bug cursor is not cleared when open terminal windows. + " in neovim-qt when using :terminal to open a shell windows, the orgin + " cursor position will be highlighted. switch to normal mode and back + " is to clear the highlight. + " This seem a bug of neovim-qt in windows. + " + " cc @equalsraf + if s:SYSTEM.isWindows && has('nvim') + stopinsert + startinsert + endif else if s:SYSTEM.isWindows let shell = empty($SHELL) ? 'cmd.exe' : $SHELL