On 1 May 2012 15:36, Eugene Arshinov earshinov@gmail.com wrote:
On Sat, 31 Mar 2012 13:48:59 +0400 Eugene Arshinov earshinov@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.
-- 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".
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@uvena.de https://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel