Review Request 127843: Properly remove composed characters

Jan Grulich jgrulich at redhat.com
Mon May 9 09:30:09 UTC 2016



> On Kvě. 7, 2016, 9:40 dop., Dominik Haumann wrote:
> > I can see that the patch works, since Qt's QTextLayout functions are used for cursor navigation.
> > 
> > I dislike the part that exposes the "currentTextLayout()", since it exposes more API (but ok, maybe we must), and it is not flexible. For instance, ktexteditor.git has a multicursor branch, and just getting the "current" text layout is not enough. Could you change it to textLayout(int line), along with a comment that the returned pointer is possibly a nullptr?
> > 
> > PS: KateViewInternal.cpp also has a KateWrappingCursor. A proper solution would be to expose this class so that proper text navigation is available everywhere (e.g. KTextEditor::ViewCursor, just like KTextEditor::DocumentCursor).

I'm trying to expose KateWrappingCursor class, but problem is that it requires access to KateViewInternal which we would still need to expose instead of currentTextLayout(). Any idea how to solve that?


- Jan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127843/#review95257
-----------------------------------------------------------


On Kvě. 5, 2016, 10:53 dop., Jan Grulich wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127843/
> -----------------------------------------------------------
> 
> (Updated Kvě. 5, 2016, 10:53 dop.)
> 
> 
> Review request for Kate, KDE Frameworks, Christoph Cullmann, and Dominik Haumann.
> 
> 
> Repository: ktexteditor
> 
> 
> Description
> -------
> 
> When using Indic locales composed characters are not properly removed. Pressing "delete" or "backspace" should remove the entire composed character and not only one base character. You can see how it should behave when using another text editor (e.g. libreoffice)
> 
> Can be tested with these words: ?????????? or ??????????? or ????????
> 
> Technical details:
> I'm not really sure whether exporting current text layout is the right way to do this, I found that this is used when calling moveChar() which moves the cursor exactly by one composed character so I was trying to find a way to do it similarly.
> 
> 
> Diffs
> -----
> 
>   src/document/katedocument.cpp 73778a1 
>   src/view/kateview.h 08db0df 
>   src/view/kateview.cpp fda6b2d 
> 
> Diff: https://git.reviewboard.kde.org/r/127843/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Jan Grulich
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20160509/bf6acbe1/attachment.html>


More information about the Kde-frameworks-devel mailing list