Mouse cursor in gvim is sometimes invisible

Bug #616858 reported by Terry J. Opie on 2010-08-12
116
This bug affects 24 people
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: vim-gnome

In some cases the mouse cursor within a gvim window disappears. It is still there, just not visible, or under the window. Left clicking and selecting text will make it reappear. Searching within gvim for matching text can (sometimes) make the cursor disappear again. This doesn't happen with every gvim window opened up, but even if it didn't happen when first opened, searching will cause it to disappear again.

[opiet@doodle ~] --> lsb_release -rd
Description: Ubuntu 10.04.1 LTS
Release: 10.04
[opiet@doodle ~] -->

[opiet@doodle ~] --> apt-cache policy vim-gnome
vim-gnome:
  Installed: 2:7.2.330-1ubuntu3
  Candidate: 2:7.2.330-1ubuntu3
  Version table:
 *** 2:7.2.330-1ubuntu3 0
        500 http://us.archive.ubuntu.com/ubuntu/ lucid/main Packages
        100 /var/lib/dpkg/status
[opiet@doodle ~] -->

Terry J. Opie (opie) wrote :

Another thing that I've noticed this morning when debugging this further... Scrolling with the mouse wheel makes the pointer disappear. Moving the cursor to just beyond the window, makes it visible again. Then when moving back over the gvim window it is visible.

Its almost as if some mouse function and/or gvim action cause the cursor to be placed behind the gvim window.

I can confirm this.

Drew MacInnis (drewmacinnis) wrote :

I noticed this behaviour too, but apparently this is a gvim "feature" called mousehide:

 http://vimdoc.sourceforge.net/htmldoc/options.html#%27mousehide%27

So perhaps along the way the default has changed (?).

Try ":set nomousehide", that should give you the gvim behaviour you are after.

Terry J. Opie (opie) wrote :

The mousehide option is not new. I still believe that this is a new bug... At the very least a change in behaviour that doesn't seem right to me. I've been using gvim since Hardy, Always setting the mousehide in my .gvimrc file, and have never had a problem until I installed 10.04.

I removed the mousehide option from my .gvimrc file to see if this alleviated the problem. It didn't. So, I'm guessing that if its not specified 'set mousehide' is the default behavior. If I explicitly put the 'set nomousehide' option in, it seemed to be ok, and I haven't seen any issues, yet.

I also noticed with my original setup (setting mousehide), that if I manually issue 'set nomousehide' in the gui, and through my normal "tricks" get the cursor to reappear, it will persist.

Not that this is a show stopper, but it would be nice to use the features that gvim provides to get the pointer out of the way while typing.

Drew MacInnis (drewmacinnis) wrote :

Ok, I misunderstood your problem at first.

So the issue is that gvim mousehide behaviour has changed... so while mousehide is supposed to hide the mouse pointer while typing it likely shouldn't stay hidden once you start to move the mouse (in Lucid it stays invisible while the mouse is moving!).

I can confirm this awkward behaviour too (I had nomousehide in my settings normally, so I didn't see this at first).

The pointer doesn't become visible until it is moved enough to exit the window and thus reappears when gvim loses focus. Seems to me like gvim likely should "un-hide" the mouse pointer once it receives mouse events indicating that the mouse is moving.

Yes I have this bug too. I've disabled mouse hide for now, but has anyone come up with a temporary fix at the very least for now? mousehide would be a nice feature to have. But I'll admit that it's not a deal breaker.

radsaq (radsaq) wrote :

:set nomousehide does not restore sane behavior for me. The cursor becomes visible more often when the gvim window loses focus, but it still goes invisible and doesn't come back after typing and then moving the mouse.

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in vim (Ubuntu):
status: New → Confirmed
Brett Johnson (linuxturtle) wrote :

I found that I had the "behave mswin" directive in my ~/.gvimrc file. I have no idea when I put that in my .gvimrc, or why I would have wanted it, but when I removed it, this long-standing problem went away :).

Running ubuntu 12.10, vim 2:7.3.547-4ubuntu1.1, etc...

Terry J. Opie (opie) wrote :

"behave mswin" wasn't the cause of the original bug... I've never had that option in any of my rc files. If you have mouse hide disabled the issue goes away. Once you enable mousehide the problem will pop back up again. I just verified this on 12.10...

Robert Muil (robertmuil) wrote :

FWIW, I see this behaviour under Fedora 18 also, so it's not specific to Ubuntu.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers