[Geany-devel] Rewrite reflow

Lex Trotman elextr at xxxxx
Tue May 1 06:24:07 UTC 2012


On 1 May 2012 15:36, Eugene Arshinov <earshinov at gmail.com> wrote:
> On Sat, 31 Mar 2012 13:48:59 +0400
> Eugene Arshinov <earshinov at gmail.com> wrote:
>
>> Hi all.
>>
>> A couple of weeks ago in Geany mailing list a discussion was raised
>> about reimplementing "Reflow paragraph" command more correctly and
>> consistently with "Line breaking".  Here is a link: [1]
>>
>> Finally I got to it and created pull request #35 [2].  As always,
>> suggestions are welcome.
>>
>> [1]: <http://lists.uvena.de/geany/2012-March/007960.html>
>> [2]: <https://github.com/geany/geany/pull/35>
>>
>> --
>> Best regards,
>> Eugene.
>
> A reminder for myself: after the pull request is accepted (if it
> happens anytime), it would be good to check bug report [3].  This bug
> report is about cursor positioning after reflow.   Also, it would be
> good to check cursor positioning after "Join lines".
>
> [3]:<http://sf.net/tracker/index.php?func=detail&aid=2875092&group_id=153444&atid=787791>

Hi Eugene,

I investigated this problem a while ago but never did anything about
it, my analysis was that the problem was due to the replace of the
text not being an atomic operation so Scintilla updates the display
several times to account for the changes as it goes, and as you move
the lines around that causes scrolling.  Since you are now doing
everything using ordinary characters, maybe the way to do it is to get
the text from the selection, re-format the text outside scintilla,
then get target from selection and replace the target in one go.

Also I don't see how you new implementation prevents you from
splitting in the middle of a multi-byte UTF-8 encoded character?

Cheers
Lex

>
> _______________________________________________
> Geany-devel mailing list
> Geany-devel at uvena.de
> https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel



More information about the Devel mailing list