2

In GVIM I use vertical thin line as my cursor by adding following line to my .gvimrc

set guicursor=a:ver13-Cursor

This works perfectly as long as window remained focused. As soon as GVIM window lost it focus cursor change to bad ugly transparent block. How can I prevent that. (This happens in all modes like insert, visual, ...)

I'm on linux-arch-gnome3-gvim

Thanks

enter image description here

EDIT1

As suggested by cristian there may be a autocmd that create this effect enter image description here

pazel1374
  • 121
  • 2
  • do you have a CursorLost autocommand? Check :verbose :au CursorLost – Christian Brabandt Nov 12 '18 at 04:12
  • @ChristianBrabandt Thanks for you reply. nice comment. Actually looklike my vim (8.0) doesn't have CursorLost event (running your command return E216: No such group or event!) but I find a new event FocusLost. I edit my post and add it's response. I think creating an autocommand on Focus lost may help – pazel1374 Nov 12 '18 at 07:11
  • Yeah, I actually meant FocusLost, that was a typo. Could disable the mentioned plugin and check if the problem still occurs? – Christian Brabandt Nov 12 '18 at 07:23
  • I disable the plugin but unfortunately the result remained the same. I also installed a fresh vim on an other machine with no config but setting cursor yesterday and see same outcome there too. If it's not rude what is your gvim version. may be do an update fix it for me – pazel1374 Nov 12 '18 at 07:28
  • This behavior is not caused by vim, but your windows manager (e.g. openbox). You should see the same effect when a terminal window looses focus. – nst0022 Nov 12 '18 at 08:29
  • @nst0022 wow. seeing the same in terminal is indeed intresting. still its a little odd that window manager do that. window manager just send lost focus to gvim right? I don't know much about wm so if I'm wrong please help me understand. my wm is mutter and I already change the source a little. I can change it again if it solve the issue – pazel1374 Nov 12 '18 at 11:06

0 Answers0