[Geany-devel] Line operations

Eugene Arshinov earshinov at xxxxx
Sun Feb 19 19:01:26 UTC 2012


On Sun, 19 Feb 2012 17:24:00 +0100
Colomban Wendling <lists.ban at herbesfolles.org> wrote:

> Le 19/02/2012 08:02, Eugene Arshinov a écrit :
> > Hi there.
> 
> Hi Eugene,
> 
> > 
> > Quick overview - I posted a pull request [3] which removes
> > `move_lines` function and uses commands already available in
> > Scintilla.  See below.
> > 
> > On Sun, 05 Feb 2012 20:50:38 +0100
> > Colomban Wendling <lists.ban at herbesfolles.org> wrote:
> > 
> >> Le 05/02/2012 13:51, Eugene Arshinov a écrit :
> >>> Hello all.
> >>
> >> Hey Eugene,
> >>
> >>> I have several suggestions and questions about certain line
> >>> operations implemented in Geany.
> >>>
> >>> 1) Recently I found that "move lines up/down" command does not
> >>> work properly for the last line not ending with a newline.  You
> >>> can easily check it yourself.  Couple of minutes ago I made a pull
> >>> request [1] with an implementation of `editor.c:move_lines()`
> >>> which handles the problem.  Dear unknown someone, please review
> >>> and pull if it's okay.
> >>
> >> I know this problem, but it needed a so big code refactoring it
> >> hurts (I want as a proof the fact your rewrite is... huge), so...
> >> I just postponed it.  Ok, shame on me.
> >>
> >> I haven't reviewed the new code yet, but I'll do.  Just as a note,
> >> Scintilla has a command to do that that suffers (suffered?) of the
> >> exact same bug we had.  Maybe it'd be good to fix their copy and
> >> use the SCI message in place of our code.
> >>
> >> [snip]
> > 
> > I didn't find those Scintilla commands
> > (SCI_MOVESELECTEDLINES{UP,DOWN} to be precise) because they are not
> > mentioned in the official Scintilla documentation [1], though they
> > are of course mentioned in Scintilla.h. For completeness, here is
> > the feature request for Scintilla where those commands came from -
> > [2].
> 
> It is in the docs:
> http://www.scintilla.org/ScintillaDoc.html#SCI_MOVESELECTEDLINESUP
> 

Stupid me.  Probably I searched for MOVELINES, not MOVESELECTEDLINES

> > The commands indeed work similarly to our own `move_lines`
> > function.  I posted pull request #24 [3] which removes `move_lines`
> > function and leverages the commands.  I hope it can be committed so
> > that I can switch my effort of improving "Move lines" feature from
> > Geany to Scintilla.
> 
> Looks fine to -- apart of course it doesn't fix the initial problem
> yet. At least so there would be only one copy of the functionality.
> 
> So just to be sure we understand each other: I drop your previous pull
> request (#21), apply this one (#24) and wait for your patch to be in
> Scintilla?
> 

Yes.  But I don't promise that I'll post a request to Scintilla *soon*…



More information about the Devel mailing list