Skip to content

Fix inline notes with dynamic wrap disabled

Waqar Ahmed requested to merge work/fix-rtl-inlinenote-no-wrap into master

When dynamic wrap is disabled we need to take care of things in a completely different way.

Remember that KTextEditor has no RTL UI. It is always LeftToRight. However, we do support RTL text. When dynamic wrap is off all our text is on the left side of the view regardless of what QTextLayout says.

While fixing this, another thing that got fixed was cursorToCoordinates, which was broken for RTL+NoWrap case. In that case, we the offset of each character is opposite i.e., the first letter is at the farthest position. See the comments in the code for more details. This is probably because Qt thinks our text is on the right side of the UI...

Merge request reports