[vim] Cursor disappears when adding/removing vertical splits (#480)

192 views
Skip to first unread message

Micha Moskovic

unread,
Nov 16, 2015, 10:05:08 AM11/16/15
to vim/vim

I am experiencing the following bug in gvim with GTK2 on linux:
when adding/removing vertical splits, the text cursor (the rectangular block that shows the selected character, not the mouse cursor) disappears and the last line, where messages and the commandline appear, is masked by a grey bar. See following screenshot.

gvim_no_cursor

This bug only happens in fullscreen mode, for specific choices of fonts and guioptions.
In my case (gnome-shell window-manager with default theme and 1920x1080 resolution), this bug appears when gvim is started with gvim -u .minivimrc, and .minivimrc contains only

set guioptions=aegirLt
set guifont=Deja\ Vu\ Sans\ Mono\ 14

As far as I can tell, the bug requires the "L" guioption, and seems to be related to an incorrect computation of the area allocated to the "vim widget" (the area of the window that looks like a vim terminal as opposed to GTK decorations) when adding/removing the left scrollbar because the split layout has changed.

  • Unmaximising and remaximising the X11 window triggers a redraw that fixes the problem (cursor appears, grey bar disappears) until the next vsplit change.
  • Executing a terminal command such as !echo works better (I get a "press ENTER" prompt, the cursor reappears but the grey bar remains, the "vim widget" now has one line less because of the grey bar, but the fix is permanent in the sense that adding/removing vsplits does not trigger the bug anymore).
  • A :redraw! does nothing.
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 11 2015 18:41:44)
Patch incluse: 1-826
Modificato da pkg-vim-m...@lists.alioth.debian.org
Compilato da buildd@
Versione gigante con GUI GTK2-GNOME.  Funzionalità incluse (+) o escluse (-):
+acl             +cmdline_info    +emacs_tags      -hangul_input    +menu            +mouse_xterm     -python3         +syntax          +virtualedit     +xsmp_interact
+arabic          +comments        +eval            +iconv           +mksession       +multi_byte      +quickfix        +tag_binary      +visual          +xterm_clipboard
+autocmd         +conceal         +ex_extra        +insert_expand   +modify_fname    +multi_lang      +reltime         +tag_old_static  +visualextra     -xterm_save
+balloon_eval    +cryptv          +extra_search    +jumplist        +mouse           -mzscheme        +rightleft       -tag_any_white   +viminfo         +xpm
+browse          +cscope          +farsi           +keymap          +mouseshape      +netbeans_intg   +ruby            +tcl             +vreplace
++builtin_terms  +cursorbind      +file_in_path    +langmap         +mouse_dec       +path_extra      +scrollbind      +terminfo        +wildignore
+byte_offset     +cursorshape     +find_in_path    +libcall         +mouse_gpm       +perl            +signs           +termresponse    +wildmenu
+cindent         +dialog_con_gui  +float           +linebreak       -mouse_jsbterm   +persistent_undo +smartindent     +textobjects     +windows
+clientserver    +diff            +folding         +lispindent      +mouse_netterm   +postscript      -sniff           +title           +writebackup
+clipboard       +digraphs        -footer          +listcmds        +mouse_sgr       +printer         +startuptime     +toolbar         +X11
+cmdline_compl   +dnd             +fork()          +localmap        -mouse_sysmouse  +profile         +statusline      +user_commands   -xfontset
+cmdline_hist    -ebcdic          +gettext         +lua             +mouse_urxvt     +python          -sun_workshop    +vertsplit       +xim
   file vimrc di sistema: "$VIM/vimrc"
       file vimrc utente: "$HOME/.vimrc"
    II file vimrc utente: "~/.vim/vimrc"
        file exrc utente: "$HOME/.exrc"
  file gvimrc di sistema: "$VIM/gvimrc"
      file gvimrc utente: "$HOME/.gvimrc"
   II file gvimrc utente: "~/.vim/gvimrc"
    file menu di sistema: "$VIMRUNTIME/menu.vim"
         $VIM di riserva: "/usr/share/vim"
Compilazione: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -
I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/u
sr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/
include/libpng12  -D_REENTRANT -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/gnome-keyring-1 -I/usr/include/libbonoboui-2.0 -I/usr/include/libxml2 -I/us
r/include/libgnome-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/orbit-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gail-1.0
 -I/usr/include/libart-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I
/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr
/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/x86_64-linux-gnu/gnome-vfs-2.0/include -I/usr/include/gconf
/2 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include    -g -O2 -fPIE -fstack-protec
tor-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      -I/usr/include/tcl8.6  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_LARGEFILE64_SOURCE=1
Link: gcc   -L. -Wl,-z,relro -L/build/ruby2.2-TAju0T/ruby2.2-2.2.3/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E  -fPIE -pie -Wl,-z,relro -Wl,-z,now -W
l,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfont
config -lfreetype   -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lgnomecanvas-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0
-lpangocairo-1.0 -latk-1.0 -lcairo -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lfontconfig -lfreetype -lgdk_pixbuf-2.0 -lgnomevfs-2 -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lgobje
ct-2.0 -lglib-2.0  -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector -L/
usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.20/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpython2.7 -lpthread -ldl -lutil
-lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions  -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-2.2 -lpthread -lgmp -ldl -lcrypt -
lm


Reply to this email directly or view it on GitHub.

John Little

unread,
Nov 17, 2015, 2:09:25 PM11/17/15
to vim_dev
FWIW, I don't see this with KDE 5.

Just speculating, this might be caused by a problem with GTK2 in Gnome 3; I have the impression that the Gnome project does that sort of thing.

Regards, John Little

Karl Yngve Lervåg

unread,
Nov 25, 2015, 2:36:21 AM11/25/15
to vim/vim

Hi @michamos. I'm on Vim version 7.4.884, and I am not able to reproduce this issue. I do the following when I try to reproduce:

  1. mv ~/.vim ~/.vim_bak
  2. gvim -u minivimrc
  3. <c-w>v

John Little

unread,
Nov 25, 2015, 4:17:38 AM11/25/15
to vim_dev
On Wednesday, November 18, 2015 at 8:09:25 AM UTC+13, John Little wrote:
> FWIW, I don't see this with KDE 5.
>
Just had the opportunity to check this with LXDE on Lubuntu, and I still don't see it.

Regards, John Little

Yuyan Li

unread,
Aug 30, 2018, 4:47:52 PM8/30/18
to vim/vim, Subscribed

Hi,

I have the same problem with Vim version 8.0 on Ubuntu 18.04.

I found out that the problem appears only when the menu bar is activated. In particular:
If set guioptions=mT the big border on the bottom of the window appears when sourcing vimrc in a maximized window.
If set guioptions=mLT the cursor disappears as described in this issue when maximizing the window.

:version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Apr 10 2018 21:31:58)
Included patches: 1-1453
Modified by pkg-vim-m...@lists.alioth.debian.org
Compiled by pkg-vim-m...@lists.alioth.debian.org
Huge version with GTK2 GUI.  Features included (+) or not (-):
+acl               +cursorshape       +job               -mouse_sysmouse    +scrollbind        +virtualedit
+arabic            +dialog_con_gui    +jumplist          +mouse_urxvt       +signs             +visual
+autocmd           +diff              +keymap            +mouse_xterm       +smartindent       +visualextra
-autoservername    +digraphs          +lambda            +multi_byte        +startuptime       +viminfo
+balloon_eval      +dnd               +langmap           +multi_lang        +statusline        +vreplace
+balloon_eval_term -ebcdic            +libcall           -mzscheme          -sun_workshop      +wildignore
+browse            +emacs_tags        +linebreak         +netbeans_intg     +syntax            +wildmenu
++builtin_terms    +eval              +lispindent        +num64             +tag_binary        +windows
+byte_offset       +ex_extra          +listcmds          +packages          +tag_old_static    +writebackup
+channel           +extra_search      +localmap          +path_extra        -tag_any_white     +X11
+cindent           +farsi             +lua               +perl              +tcl               -xfontset
+clientserver      +file_in_path      +menu              +persistent_undo   +termguicolors     +xim
+clipboard         +find_in_path      +mksession         +postscript        +terminal          +xpm
+cmdline_compl     +float             +modify_fname      +printer           +terminfo          +xsmp_interact
+cmdline_hist      +folding           +mouse             +profile           +termresponse      +xterm_clipboard
+cmdline_info      -footer            +mouseshape        -python            +textobjects       -xterm_save
+comments          +fork()            +mouse_dec         +python3           +timers
+conceal           +gettext           +mouse_gpm         +quickfix          +title
+cryptv            -hangul_input      -mouse_jsbterm     +reltime           +toolbar
+cscope            +iconv             +mouse_netterm     +rightleft         +user_commands
+cursorbind        +insert_expand     +mouse_sgr         +ruby              +vertsplit
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux
-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango
-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/incl
ude -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -Wdate-time  -g -
O2 -fdebug-prefix-map=/build/vim-NQEcoP/vim-8.0.1453=. -fstack-protector-strong -Wformat -Werror=format-security -U_FOR
TIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc   -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector -rdynamic -Wl,-export-dynamic -Wl
,-E  -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo
-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfr
eetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/li
b -llua5.2 -Wl,-E  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -lperl -ldl -l
m -lpthread -lcrypt  -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm -L/usr/li
b/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lm -lruby-2.5 -lpthread -lgmp -ldl -lcrypt -lm


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub

Eric Walkingshaw

unread,
Jan 4, 2021, 3:12:11 AM1/4/21
to vim/vim, Subscribed

I think I just encountered this bug with Vim 8.2 on Fedora 33. I've had the issue since doing a system update a couple days ago.

The bug occurred with set guioptions=egrt. The bug occurred 10-20% of the time when switching windows in Gnome or when switching panes within gvim. Switching windows away from gvim and back again (using alt-tab) would temporarily resolve the issue (although sometimes this took a couple tries).

Changing to set guioptions= seems to have resolved the issue. I don't use the menus or scrollbars anyway, so this workaround is fine for me.

> gvim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Dec 18 2020 00:00:00)
Included patches: 1-2146
Modified by <bugz...@redhat.com>
Compiled by <bugz...@redhat.com>
Huge version with GTK3 GUI.  Features included (+) or not (-):
+acl               -farsi             +mouse_sgr         +tag_binary
+arabic            +file_in_path      -mouse_sysmouse    -tag_old_static
+autocmd           +find_in_path      +mouse_urxvt       -tag_any_white
+autochdir         +float             +mouse_xterm       -tcl
-autoservername    +folding           +multi_byte        +termguicolors
+balloon_eval      -footer            +multi_lang        +terminal
+balloon_eval_term +fork()            -mzscheme          +terminfo
+browse            +gettext           +netbeans_intg     +termresponse
++builtin_terms    -hangul_input      +num64             +textobjects
+byte_offset       +iconv             +packages          +textprop
+channel           +insert_expand     +path_extra        +timers
+cindent           +ipv6              +perl/dyn          +title
+clientserver      +job               +persistent_undo   +toolbar
+clipboard         +jumplist          +popupwin          +user_commands
+cmdline_compl     +keymap            +postscript        +vartabs
+cmdline_hist      +lambda            +printer           +vertsplit
+cmdline_info      +langmap           +profile           +virtualedit
+comments          +libcall           -python            +visual
+conceal           +linebreak         +python3/dyn       +visualextra
+cryptv            +lispindent        +quickfix          +viminfo
+cscope            +listcmds          +reltime           +vreplace
+cursorbind        +localmap          +rightleft         +wildignore
+cursorshape       +lua/dyn           +ruby/dyn          +wildmenu
+dialog_con_gui    +menu              +scrollbind        +windows
+diff              +mksession         +signs             +writebackup
+digraphs          +modify_fname      +smartindent       +X11
+dnd               +mouse             +sound             -xfontset
-ebcdic            +mouseshape        +spell             +xim
+emacs_tags        +mouse_dec         +startuptime       +xpm
+eval              +mouse_gpm         +statusline        +xsmp_interact
+ex_extra          -mouse_jsbterm     -sun_workshop      +xterm_clipboard
+extra_search      +mouse_netterm     +syntax            -xterm_save
   system vimrc file: "/etc/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "/etc/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
       defaults file: "$VIMRUNTIME/defaults.vim"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/etc"
 f-b for $VIMRUNTIME: "/usr/share/vim/vim82"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/libxml2 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/at-spi-2.0 -pthread    -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1       
Linking: gcc   -L. -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--enable-new-dtags -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld   -Wl,-z,relro  -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -L/usr/local/lib -Wl,--as-needed -o vim   -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0  -lSM -lICE -lXpm -lXt -lX11 -lSM -lICE  -lm  -lselinux  -lncurses -lcanberra  -lacl -lattr -lgpm -ldl   -Wl,--enable-new-dtags -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld  -fstack-protector-strong -L/usr/local/lib  -L/usr/lib64/perl5/CORE -lperl -lpthread -lresolv -ldl -lm -lcrypt -lutil -lc


You are receiving this because you are subscribed to this thread.

Reply to this email directly, view it on GitHub, or unsubscribe.

jobol

unread,
May 13, 2022, 4:04:02 AM5/13/22
to vim/vim, Subscribed

I can see that bug back on fedora 36. I'll probably read the issue and then decide of continuation. But I'm a little woodlouse


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/480/1125768648@github.com>

Reply all
Reply to author
Forward
0 new messages