After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730800 - Display glitches with rectangular selection and tab/cjk
Display glitches with rectangular selection and tab/cjk
Status: RESOLVED FIXED
Product: vte
Classification: Core
Component: general
0.37.x
Other Linux
: Normal minor
: ---
Assigned To: VTE Maintainers
VTE Maintainers
: 682689 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-05-27 09:56 UTC by Egmont Koblinger
Modified: 2014-06-23 12:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (1.19 KB, patch)
2014-05-27 09:57 UTC, Egmont Koblinger
needs-work Details | Review
fix v2 (2.74 KB, patch)
2014-05-27 22:54 UTC, Egmont Koblinger
committed Details | Review
fix for deselecting cjk/tab in rect mode (804 bytes, patch)
2014-06-22 19:22 UTC, Egmont Koblinger
committed Details | Review
fix for starting a rectangular selection (1.64 KB, patch)
2014-06-22 20:16 UTC, Egmont Koblinger
committed Details | Review

Description Egmont Koblinger 2014-05-27 09:56:01 UTC
Print a text that contains TABs and CJK characters. Highlight a rectangular area (Ctrl+mouse). Notice artifacts when you move the mouse to the left.
Comment 1 Egmont Koblinger 2014-05-27 09:57:49 UTC
Created attachment 277271 [details] [review]
fix

Solve it with a hammer :)

Given it's a rare user-initiated action, I don't think it's worth it spending time and increasing code complexity on anything more sophisticated.
Comment 2 Behdad Esfahbod 2014-05-27 20:10:58 UTC
Works for me.  Mind adding a macro for the number of bits and rewrite pieces based on it instead of a comment?
Comment 3 Egmont Koblinger 2014-05-27 22:54:00 UTC
Created attachment 277350 [details] [review]
fix v2

Do you mean something like this?
Comment 4 Behdad Esfahbod 2014-05-27 23:18:12 UTC
Yep.  Thanks.
Comment 5 Egmont Koblinger 2014-05-28 10:29:43 UTC
Comment on attachment 277350 [details] [review]
fix v2

b446923
Comment 6 Egmont Koblinger 2014-06-16 12:14:42 UTC
*** Bug 682689 has been marked as a duplicate of this bug. ***
Comment 7 Egmont Koblinger 2014-06-22 19:09:57 UTC
Reopening.

If the bottom right character of a rectangular selection is further extended to the right (because it's a CJK or TAB) and then the selection is cleared (just click anywhere) then it's not properly updated.
Comment 8 Egmont Koblinger 2014-06-22 19:22:26 UTC
Created attachment 278945 [details] [review]
fix for deselecting cjk/tab in rect mode
Comment 9 Egmont Koblinger 2014-06-22 19:39:59 UTC
Comment on attachment 278945 [details] [review]
fix for deselecting cjk/tab in rect mode

9ef0dcf
Comment 10 Egmont Koblinger 2014-06-22 19:46:48 UTC
And there's one more.

With Monospace 8 (6x13) font, have an English letter followed by a CJK/TAB. Start a rectangular selection with the English letter, towards the right.

When the selection appears first, it's the English letter, plus about 1.5 cells of the CJK/TAB highlighted.

It's no longer repeatable during the same selection process (i.e. by dragging, but not releasing the mouse) so I guess it has something to do with the drag threshold.  Also, the behavior varies with different font sizes.
Comment 11 Egmont Koblinger 2014-06-22 20:16:39 UTC
Created attachment 278951 [details] [review]
fix for starting a rectangular selection

There were 4 calls to start_selection() in the code, 2 of them immediately followed by extend_selection() with identical parameters, and 2 not.  start_selection() doesn't do any cell invalidation, extend_selection() does.  This patch makes start_selection() call extend_selection() so it's no longer the caller's responsibility not to forget about it.
Comment 12 Egmont Koblinger 2014-06-23 12:38:58 UTC
Comment on attachment 278951 [details] [review]
fix for starting a rectangular selection

73745f9