Do not paint long pre-edit text outside display
ClosedPublic

Authored by mglb on Apr 26 2018, 9:57 PM.

Details

Summary

Test Plan
  • Turn on IME (tested with ibus+anthy)
  • Type (without accepting) long text using IME

Expected result: text should not be drawn outside terminal
Actual result: text is drawn on terminal, margins, scrollbar

Diff Detail

Repository
R319 Konsole
Branch
arc/cursor-fixes/0005-Do-not-paint-long-pre-edit-text-outside-display
Lint
No Linters Available
Unit
No Unit Test Coverage
mglb requested review of this revision.Apr 26 2018, 9:57 PM
mglb created this revision.

What language are you using? I can't reproduce testing a few rtl and ltr - also did the recent commit change this?

mglb added a comment.May 3 2018, 4:37 PM

The language in example is Japanese. This is unrelated to last RTL-related commit.
You can't test it with anything that runs on TTY. IME pre-edit text does not interact with TTY - Konsole receives (through Qt) either "render this string in a nice way" or "use this string as regular input" message. The commit fixes the former.

OK looks fine - I wonder if using intersected() is any better/faster/more readable/etc

mglb updated this revision to Diff 33695.May 5 2018, 11:17 PM

Every reasonable code which solves this problem gives the same assembly (with -O2, used in release builds), so speed will not change.
As for "more readable" you're right. Additionally I've decided to separate the original rect. Any code added in the same line as the last QRect parameter might "disappear" during quick code scan.

mglb updated this revision to Diff 33696.May 5 2018, 11:21 PM

Fix diff

mglb updated this revision to Diff 33697.May 5 2018, 11:26 PM

Rebase. Really fix the diff

mglb updated this revision to Diff 33698.EditedMay 5 2018, 11:28 PM

Set upstream master

Edit: ok, looks good.

hindenburg accepted this revision.May 7 2018, 12:19 AM
This revision is now accepted and ready to land.May 7 2018, 12:19 AM
This revision was automatically updated to reflect the committed changes.