thestinger / termite

Termite is obsoleted by Alacritty. Termite was a keyboard-centric VTE-based terminal, aimed at use within a window manager with tiling and/or tabbing support.
https://github.com/alacritty/alacritty
2.73k stars 240 forks source link

Selecting and yanking text is off by one column, last column of selection is skipped. #672

Closed Warepire closed 5 years ago

Warepire commented 5 years ago

After updating to use vte-ng 0.56.2 whenever I escape into select mode to select a part of one line and yank that to clipboard the last character is occasionally dropped.

Unfortunately I don't have any more information to provide. I've been unable to gather more details around the behavior but I cannot see any patterns to it.

If there are anything I can log either from termite or vte to help track down the issue, let me know. (I can make modifications to the code as necessary while tracking it)

Warepire commented 5 years ago

Based on more testing all selections are off by one column, so it's down to poor initial testing by me.

A quick hack to just pass an additional column to vte_terminal_select_text in termite does fix the behavior. The commit in vte that rewrote the coordinate system is half a year old but was first pulled into the 0.55 / 0.56 release cycle of vte. It cannot be trivially reverted in order to quickly test if that commit or something else broke it.

EDIT: May 9th: I tested incorrectly, corrected description.

Warepire commented 5 years ago

From GNOME #vte IRC:

22:57 < Warepire> Hi, I encountered what appears as an off-by-one somewhere in select_text() in version 0.56.2 (noted here, but my testing is rather 
                  poor at this time: https://github.com/thestinger/termite/issues/672). I am wondering if the changed behavior of select_text() was 
                  intended or not? And if it wasn't, any pointers on how to debug it further?
23:03 < chpe> in 0.55, vte internal code has changed so that selection bounds are exclusive the end position, that's probably it
23:04 < Warepire> Yeah, that's what I am seeing
23:04 < Warepire> Thanks for the information, may I post this response in the issue tracker?
23:04 < Warepire> (of termite)
23:05 < chpe> sure
23:05 < Warepire> Great, thanks