vim-gnome "swap already exists" dialog erroneously triggers hot corners

Bug #535341 reported by Joel Bradshaw
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vim (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Karmic by Mackenzie Morgan
Nominated for Lucid by Joel Bradshaw

Bug Description

Binary package hint: vim-gnome

This bug is described (and has been fixed) in Suse: https://bugzilla.novell.com/show_bug.cgi?id=392061

Ubuntu 9.10
Package: vim-gnome
Installed: 2:7.2.245-2ubuntu2

Expected: Swap dialog would just go away and let me continue working
Happened: Expo was triggered, requiring me to double-click back into my working desktop

Vim contains a workaround (called a "Terrible hack" in the source comments) for a KDE 3.1 bug that warps the mouse pointer off-screen and back. Unfortunately, this activates the upper-left hotcorner if the user has it configured. In Ubuntu, this is very often the case with Compiz. Personally, I have the Expo action mapped to it, so every time I close the "swap already exists" dialog, it zooms out and I have to click back into it.

The bug is in gui_gtk.c of the Vim source, and just needs a few lines commented out. I've attached a patch for that file that does just that.

I've send a bug report to the Vim team as well, but this is an easy-to-fix, low-risk bug that is highly perplexing and fairly disruptive to end-users, and affects anyone who:
1) Uses gVim/vim-gnome
2) Has an action mapped to the upper-left hotcorner.

As such, it would be nice to get fixed in Ubuntu's build of Vim, until Vim themselves take care of it.

Steps to reproduce:
1) Configure Compiz to map an action to the upper-left corner (such as Expo)
2) Open up gVim
3) Type ":e test<Return>" to start editing a test file and generate a swap file
4) Open another instance of gVim
5) Type ":e test<Return>" to attempt to edit the test file
6) Click "Edit Anyway" to dismiss the dialog
7) The action will be triggered.

It should be noted that opening two instances of Vim are not necessary to trigger the bug (it happens whenever a swap file is present), but it is the easiest way to reliably generate a swap file. Any files created can, of course, be deleted after the test.

Revision history for this message
Joel Bradshaw (cincodenada) wrote :
tags: added: kernel-series-unknown
tags: added: patch
Revision history for this message
Joel Bradshaw (cincodenada) wrote : apport-collect data

Architecture: i386
CheckboxSubmission: 51409d673ef5a15bbb28f4473c48692f
CheckboxSystem: d00f84de8a555815fa1c4660280da308
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
NonfreeKernelModules: wl
Package: gnome-vim (not installed)
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
Uname: Linux 2.6.31-19-generic i686
UserGroups: adm admin cdrom dialout lpadmin mythtv plugdev sambashare

Revision history for this message
Joel Bradshaw (cincodenada) wrote : XsessionErrors.txt
tags: added: apport-collected
Revision history for this message
Joel Bradshaw (cincodenada) wrote : apport-collect data

Architecture: i386
CheckboxSubmission: 51409d673ef5a15bbb28f4473c48692f
CheckboxSystem: d00f84de8a555815fa1c4660280da308
DistroRelease: Ubuntu 9.10
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
NonfreeKernelModules: wl
Package: vim-gnome 2:7.2.245-2ubuntu2
PackageArchitecture: i386
ProcEnviron:
 SHELL=/bin/bash
 PATH=(custom, user)
 LANG=en_US.UTF-8
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic
Uname: Linux 2.6.31-19-generic i686
UserGroups: adm admin cdrom dialout lpadmin mythtv plugdev sambashare

Revision history for this message
Joel Bradshaw (cincodenada) wrote : Dependencies.txt
Revision history for this message
Joel Bradshaw (cincodenada) wrote : XsessionErrors.txt
tags: added: karmic
removed: kernel-series-unknown
Revision history for this message
Joel Bradshaw (cincodenada) wrote :

Sorry for the double-post, I ran apport the first time with the wrong package name, and can't seem to delete the first run. This bug also occurs on my work computer, which is also Karmic but is amd64. This bug should be platform-independent though, as long as it's GNOME and Vim. I updated the kernel series to be Karmic, sorry if that's not my place.

Revision history for this message
Joel Bradshaw (cincodenada) wrote :

I contacted the Vim bugs person simultaneously to filing this bug, and didn't expect such a quick response. But the fix went into Vim SVN yesterday:
http://vim.svn.sourceforge.net/viewvc/vim/vim7/src/gui_gtk.c?revision=1793&view=markup
So as long as Ubuntu uses a Vim from past that revision, no special patches are necessary. I'm not sure how Ubuntu compiles its Vim, but it's grabbed from a recent version of SVN, this bug can probably be closed.

Revision history for this message
Joel Bradshaw (cincodenada) wrote :

I checked the latest release over at Vim, and the package (and diffs) in Ubuntu's repos, and this hasn't been fixed in either place. It's in Vim's SVN, but I'm not sure what Vim's release cycle is, or what the process is to update a package in Ubuntu's repos.
This is a pretty straightforward, easy-to-fix issue that could be rolled into the diff file for Ubuntu in the meantime. Is there a possibility of this being done in the near future? It's not a frequent issue - an edge case to be sure - but with Compiz being installed by default in Ubuntu, it's something that should be fixed, especially when it's as small and certain as removing code that is clearly labelled a terrible hack, and only a terrible hack.

Revision history for this message
Joel Bradshaw (cincodenada) wrote :

I did a little more investigating, and the source version on Vim's site is 7.2.269, the one in Ubuntu repos for Karmic is 7.2.245, Lucid is 7.2.330, and this fix was instituted in 7.2.386. Will it just have to wait for the next release to be bumped up beyond 386, or can the package be updated between releases?

Changelog at Vim w/ fix and version number:
http://vim.svn.sourceforge.net/viewvc/vim?view=rev&revision=1793

Revision history for this message
Chow Loong Jin (hyperair) wrote :

As per the last comment (#10), I'm changing the patch tag to patch-accepted-upstream to reflect its status.

tags: added: patch-accepted-upstream
removed: patch
Changed in vim (Ubuntu):
status: New → Fix Committed
tags: added: patch
Revision history for this message
Joel Bradshaw (cincodenada) wrote :

I just upgraded to Maverick, and vim-gnome is still at 7.2.330. When will the gnome-vim package be upgraded to a more recent version of Vim? The current version of vim-gnome in Maverick still has this bug.

Revision history for this message
Michael Bienia (geser) wrote :

vim 7.3.035 is awaiting sponsoring to "natty" (bug 662276). Once it's in natty you can try to request a backport of it to "maverick" to get a newer version of vim. https://help.ubuntu.com/community/UbuntuBackports describes the process for it.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (8.7 KiB)

This bug was fixed in the package vim - 2:7.3.035+hg~8fdc12103333-1ubuntu1

---------------
vim (2:7.3.035+hg~8fdc12103333-1ubuntu1) natty; urgency=low

  * Merge with Debian unstable (lp: #662276):
    - Use case-insensitive matching for month and day of week names in
      crontab's syntax file (lp: #517019 aka Debian bug #568378).
    - Fix sqlcomplete's <Left>/<Right> maps so they don't interfere with
      normal usage (lp: #584797 aka Debian bug #560083).
    - [7.2.386] KDE 3.1 focus hack causes problems for other window managers
      (lp: #535341).
  * Remaining changes:
    - debian/control:
      + Drop vim-lesstif package and lesstif2-dev build-dependency.
      + Rename Vcs-* to XS-Debian-Vcs-*.
    - debian/rules:
      + Don't build the vim-lesstif variant in Ubuntu.
    - debian/runtime/debian.vim.in:
      + Add Launchpad integration to the Help menu if launchpad-integration is
        installed.
    - debian/runtime/vimrc:
      + "syntax on" is a sane default for non-tiny vim
    - debian/patches/debian/ubuntu-grub-syntax.patch:
      + Add Ubuntu-specific "quiet" keyword.

vim (2:7.3.035+hg~8fdc12103333-1) unstable; urgency=low

  * Pull patches 001 - 035.
    + More robust YAML highlighting. (Closes: #535682)
  * debian/rules:
    + Stop overriding CFLAGS on the command-line when invoking make. Upstream
      enforces an upper-limit of 1 for _FORTIFY_SOURCE due to the use of
      flexible arrays in nested structs, which improperly cause Vim to crash
      with _FORTIFY_SOURCE=2.
    + Use DEB_HOST_ARCH_OS instead of DEB_HOST_GNU_SYSTEM to determine whether
      Linux-specific functionality is enabled.
    + Use dpkg-vendor to change build configuration when building on Ubuntu.
      Thanks to Michael Bienia for the patch.
  * Make helpztags capable of generating tags files for non-English help
    files. (Closes: #600248)
  * Debian runtime:
    + Add natty as a recognized distribution. (Closes: #600560)
    + Add metapackages as a recognized section. (Closes: #600562)
    + Remove etch as a recognized distribution.
  * debian/control: Add dpkg-dev (>= 1.15.1) Build-Depends for dpkg-vendor.

vim (2:7.3.000+hg~ee53a39d5896-1) unstable; urgency=low

  * New upstream release.
  * debian/rules:
    + Explicitly use the dynamic loading Python interfaces.
    + Remove cleanup from clean target which are now properly handled by
      upstream's Makefile.
  * Update version information in documentation.

vim (2:7.3f.20100812+hg~20e83abf88b1-1) experimental; urgency=low

  * Merge latest 7.3f pre-release.
    + Correctly restore multi-byte terminal titles when exiting Vim. (Closes:
      #558153)
    + Highlight text inside math zones correctly for tex files. (Closes:
      #509908)
    + Recognize nested cite regions in tex files. (Closes: #444288)
    + Support syntax highlighting of bash's $"". (Closes: #473736)
  * Patches merged upstream:
    + perl-indent-block.patch
    + logcheck-ftplugin.patch
    + tex-syntax-verbatim-spell.patch
  * Enable Lua scripting.
    + Add liblua5.1-0-dev and lua5.1 to Build-Depends.
    + Enable lua interface via dynamic loading.
  * Switch Perl interface to dynamic loading.
  * debi...

Read more...

Changed in vim (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.