GNOME Bugzilla – Bug 730800
Display glitches with rectangular selection and tab/cjk
Last modified: 2014-06-23 12:39:15 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.
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.
Works for me. Mind adding a macro for the number of bits and rewrite pieces based on it instead of a comment?
Created attachment 277350 [details] [review] fix v2 Do you mean something like this?
Yep. Thanks.
Comment on attachment 277350 [details] [review] fix v2 b446923
*** Bug 682689 has been marked as a duplicate of this bug. ***
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.
Created attachment 278945 [details] [review] fix for deselecting cjk/tab in rect mode
Comment on attachment 278945 [details] [review] fix for deselecting cjk/tab in rect mode 9ef0dcf
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.
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 on attachment 278951 [details] [review] fix for starting a rectangular selection 73745f9