Fix trailing space visualization for RTL lines.
ClosedPublic

Authored by safaalfulaij on Sep 15 2017, 2:34 PM.

Details

Summary

Fix trailing space visualization for RTL lines.
It was getting paint on top of the character (to the right of the cursor).

Test Plan

Tested and worked for both lines

Diff Detail

Repository
R39 KTextEditor
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
safaalfulaij created this revision.Sep 15 2017, 2:34 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptSep 15 2017, 2:34 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
kfunk added a subscriber: kfunk.Sep 15 2017, 2:50 PM

Could you add before/after screenshots for this?

I think this could also help non-RTL users understand what you're fixing. Would be super helpful for me at least :)

Yeah, +1 ;=)
Without screeny, we can't judge.
In any case: thanks for taking care!

Before:

After:

cullmann accepted this revision.Sep 15 2017, 2:59 PM

In deed, looks correct now and bogus before.

Please commit.

Could you perhaps add the link to this https://phabricator.kde.org/D7840 to the comment in the code? then we can easy find that again without git blame/...

This revision is now accepted and ready to land.Sep 15 2017, 2:59 PM
kfunk added a comment.Sep 15 2017, 3:08 PM

Indeed, thanks for those fixes. /me can see a nice blog post coming a long...? :)

safaalfulaij added a comment.EditedSep 15 2017, 3:19 PM
In D7840#146110, @kfunk wrote:

Indeed, thanks for those fixes. /me can see a nice blog post coming a long...? :)

Not yet maybe
There are other visualizations that are not working for RTL lines, like non-printable spaces, non-breakable space and tabs. (Indent markers are not needed for RTL lines)
They don't appear at all. I tried fixing them but didn't succeed :p

This revision was automatically updated to reflect the committed changes.
safaalfulaij added a comment.EditedSep 15 2017, 4:23 PM

Sorry, my mistake. The post-commit trigger thing didn't close this, maybe because the #post part is there /me how come I didn't notice! :|
Update: it worked after a while, hmm.
https://cgit.kde.org/ktexteditor.git/commit/?id=bb328146ecd64f97710eb09f568001cd4d40f622

The hook doesn't cause the immediate closure of a diff. The hook asks Phabricator's background processes to initiate an update of the repository.
When those commits are processed, the review gets closed.

Depending on how busy Phabricator is processing other commits this can take a few minutes to take place.