Bug 428426

Summary: Mouse not working on rightmost side of wide screen
Product: [Applications] konsole Reporter: koomahnah
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: REPORTED ---    
Severity: normal CC: ninjalj
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description koomahnah 2020-10-29 11:51:21 UTC
I'm using Vim with "mouse=a" setting, which allows one to select text and scroll within editor window using mouse. This is not working properly on wide screens – I'm able to use mouse only on the part of the screen. There's no effect when using mouse on the far right part of the screen – it seems that in case of 3440x1440 screen, mouse is inactive on the rightmost 1/3 of it.


STEPS TO REPRODUCE
Wide screen monitor is needed. I'm working on 3440x1440, but I was also able to reproduce it on a smaller one.
1. Launch Vim. Open any text file with content longer than one screen (":e file.txt").
2. Set mouse to be active: ":set mouse=a"
2. Hover the cursor over left side of the screen. You should be able to scroll using mouse scroll wheel.
3. Hover the cursor over rightmost side of the screen, at least 2/3 from the left.

OBSERVED RESULT
Mouse scroll is not working.

EXPECTED RESULT
Mouse scroll should be working.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Ubuntu 18.04
(available in About System)
KDE Plasma Version: KDE 5.12.9
KDE Frameworks Version: 5.44.0
Qt Version: 5.9.5
konsole 17.12.3

ADDITIONAL INFORMATION
This is not reproducible with xterm nor with gnome-terminal. Only konsole seems to be affected.
Comment 1 ninjalj 2021-03-23 12:01:16 UTC
In Vim, you should ":set ttymouse=sgr". Otherwise, Vim uses the older xterm2 protocol (1002), which only allows up to 223 (or, in non 8-bit clean transports, 95) columns.

Vim autodetection uses the Secondary DA request (CSI > c) to select which protocol to use. Konsole replies with "CSI>0;115;0c", which means "VT100;firmware version/xterm patch 115;ROM cartridge registration no 0". Vim only autosets ttymouse=sgr for version >= 277. I'm not sure changing Konsole's reported version to something higher is a good idea, who knows what random applications will expect from higher versions.
Comment 2 ninjalj 2021-03-23 12:04:15 UTC
BTW, vte 2.91 (the terminal emulation library used by gnome-terminal) reports "65;6003;1c", that is "VT525;xterm patch 6003;ROM registration no 28"