micro icon indicating copy to clipboard operation
micro copied to clipboard

Scrolling issue with gnome-terminal

Open taterbase opened this issue 9 years ago • 16 comments

  • gnome-terminal
  • debian jessie
  • i3wm

Inside of the editor when I go to scroll down or up the file will scroll for half a second and then stop. If I move my cursor at this point I can see that it is actively highlighting text. I can click out of that and try to scroll again but the same thing happens.

I noticed something similar mentioned in the closed issue https://github.com/zyedidia/micro/issues/131 and thought to try the upstream tcell in a new build. This didn't allow scrolling at all and would only highlight.

taterbase avatar Jun 02 '16 01:06 taterbase

I've been doing a ton of debugging. I set it up to thread through the btn value from tcell/tscreen.go up to the event listener in cmd/micro/view.go so that it could be logged

xterm, rxvt, mate-terminal all consistently send out Wheel(Up|Down) events. gnome-terminal however sends an occasional 0 or left click event that then translates into a stuck button state. I'm hopeful the problem can be resolved in the tcell lib but I'm also concerned this may just be my setup/installation. Has anyone else had success with gnome-terminal?

taterbase avatar Jun 02 '16 03:06 taterbase

i could not replicate i3, fedora. maybe try a newer version of gnome-terminal?

ghost avatar Jun 02 '16 04:06 ghost

@taterbase I had this exact same problem with urxvt, when scrolling down it would send right button requests sometimes, and when scrolling up left button clicks, which causes the selection issue, for me this fixed it: https://github.com/zyedidia/tcell/commit/9fcf6e074b20dd8835ab184e61aabc7057683180 (please ignore the typos in the commit message, I only found out later ;) )

CamilleScholtz avatar Jun 02 '16 11:06 CamilleScholtz

@n7fury good to know. I updated to a newer gnome-terminal and it was indeed my installation.

@onodera-punpun that definitely worked but it also made it so I couldn't click :).

I'm gonna update my terminal and consider this my machine misbehaving. Thanks for the help everyone.

taterbase avatar Jun 02 '16 16:06 taterbase

@taterbase Woops, linked the wrong commit actually :^)

https://github.com/zyedidia/tcell/commit/5bd0aceacb785e37496e446e68d8d1600042b295

anyways this has been merged already, but like you can see there's obviously some hacks going on around scrolling and button 1/2, so I think this issue should stay open maybe?

CamilleScholtz avatar Jun 02 '16 16:06 CamilleScholtz

@onodera-punpun oh, I see what you mean!

I'm open to the idea of leaving the issue open... but I really think this was my machine misbehaving. I'm not positive. Are you still experiencing the issue?

taterbase avatar Jun 02 '16 16:06 taterbase

Really seldom it still seems to happen for me (using rxvt-unicode), but I can't seem to reproduce it. maybe I even click button1 on accident, although I can't really imagine that. Anyways, it might happen on other terminals as well..

did your updating of gnome-terminal fix this for you?

CamilleScholtz avatar Jun 02 '16 16:06 CamilleScholtz

Yes, updating gnome-terminal fixed the issue for me.

taterbase avatar Jun 02 '16 17:06 taterbase

@taterbase was the update in the debain main repo? If it wasn't we should probably start something like a know issues list.

ghost avatar Jun 03 '16 01:06 ghost

@n7fury the update was not in the main repo. I'm still unsure if it was my particular setup at fault but I'll do some more testing today

taterbase avatar Jun 03 '16 14:06 taterbase

Ok, just tried again on a fresh install. Tested on i3 and gnome. I think this scrolling issue pertains to the Debian Jessie + gnome-terminal combo. I'm going to go ahead and reopen this ticket and investigate some more this weekend.

taterbase avatar Jun 04 '16 15:06 taterbase

Scrolling by mousewheel completely ignored (Windows 7 64bit, CMD.EXE, micro v1.1.1).

ghost avatar Oct 19 '16 09:10 ghost

@adrianvoica I think that's because cmd.exe does not support the mouse.

zyedidia avatar Oct 19 '16 14:10 zyedidia

@taterbase Does this still occur with the most recent micro and the most recent gnome terminal? ( I have not had this issue that I know of. )

GeigerCounter avatar Mar 29 '17 08:03 GeigerCounter

Here, I am with:

  • Ubuntu Gnome 16.04 64bit
  • terminator 0.98
  • i3wm and i3-gaps
  • micro 1.3.4

When I scroll over the file footer*, micro crashes:

Micro encountered an error: runtime error: invalid memory address or nil pointer dereference
runtime.errorString runtime error: invalid memory address or nil pointer dereference
/home/zbyedidia/go/src/runtime/panic.go:491 (0x42b9d3)
/home/zbyedidia/go/src/runtime/panic.go:63 (0x42a8de)
/home/zbyedidia/go/src/runtime/signal_unix.go:367 (0x4423bc)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/view.go:498 (0x8f518a)
/home/zbyedidia/gopath/src/github.com/zyedidia/micro/cmd/micro/micro.go:518 (0x8bf14d)
/home/zbyedidia/go/src/runtime/proc.go:185 (0x42d7dd)
/home/zbyedidia/go/src/runtime/asm_amd64.s:2337 (0x45aad1)

But it does not happen when CtrlE is activated.

* where the name, cursor position, file type and some help shortcuts appear.

aryelgois avatar Jan 23 '18 15:01 aryelgois

Is anyone still seeing this issue with a recent version of micro?

dmaluka avatar Apr 14 '24 23:04 dmaluka