Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resizing windows to the right in the terminal is broken #162

Open
jody-frankowski opened this issue Mar 15, 2019 · 8 comments
Open

Resizing windows to the right in the terminal is broken #162

jody-frankowski opened this issue Mar 15, 2019 · 8 comments
Assignees
Labels

Comments

@jody-frankowski
Copy link

jody-frankowski commented Mar 15, 2019

Hi,

There seems to be a bug with git-gutter that breaks the left-margin mouse-movement behavior.

Here is the smallest config that lets me reproduce the bug.

init.el:

(require 'package)
(package-initialize)

(setq package-archives '(("org"   . "http://orgmode.org/elpa/")
                            ("gnu"   . "http://elpa.gnu.org/packages/")
                            ("melpa" . "https://melpa.org/packages/")))
(package-refresh-contents)
(unless (package-installed-p 'use-package)
    (package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)

(xterm-mouse-mode)

(use-package git-gutter)
(global-git-gutter-mode)

(find-file "init.el")
(split-window-right)
(other-window 1)
(find-file "init.el")

Then execute the following:

git init
git add init.el
git commit -m "up"
echo '(message "hello")' >> init.el
emacs -nw -q --load init.el init.el

Then if you try to resize to the right you should have the following error:

<left-margin> <mouse-movement> is undefined

It sometimes work, but very rarely in my experience.
I haven't been able to reproduce this without git-gutter.

GNU Emacs 27.0.50
git-gutter-20161105.1356
@gonewest818
Copy link
Collaborator

It doesn't seem specific to git-gutter, though. I can reproduce this with linum-mode as well:

  1. emacs -nw -q
  2. M-x xterm-mouse-mode
  3. C-x b *scratch*
  4. C-x 3
  5. M-x linum-mode
  6. then try to resize to the right

Suggesting the issue occurs upstream somewhere?

@gonewest818
Copy link
Collaborator

I'm going to mark this as an "upstream" bug and leave it open.

@gonewest818
Copy link
Collaborator

I've just re-verified the same upstream bug exists in 27.0.91

@gonewest818
Copy link
Collaborator

upstream bug report:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41156

@jody-frankowski
Copy link
Author

jody-frankowski commented May 9, 2020

I'm not really sure where linum-mode is supposed to fit in there.
I keep trying to disable linum-mode, with (global-linum-mode -1) for example, but the mode keeps showing up in (describe-mode), even though it doesn't seem to be "enabled" because no line numbers are shown.
Have you found a way to disable it in order to isolate it from git-gutter to make sure it's the source of the bug?

@gonewest818
Copy link
Collaborator

I’m just saying I can reproduce the issue with linum, which is a core Emacs package that also displays information in the left margin. That’s why I’m reporting it as an Emacs bug because it seems more likely the issue is somewhere in the window management part of Emacs.

@gonewest818
Copy link
Collaborator

... and in my comment above, where I run emacs -nw -q the -q means I'm disabling my initialization file so that git-gutter (and any other package I typically use) is not present during the test.

@gonewest818
Copy link
Collaborator

The Emacs maintainers fixed the upstream bug for the upcoming v28 release:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=41156

I just compiled Emacs 28 from source and with that build I can't reproduce the bug.

@gonewest818 gonewest818 self-assigned this Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants