John Levon wrote:
> Hmm, I sent a patch for this already :/ Did you not notice the bug was
> assigned to me?

I noted that after I have done the patch, and I didn't notice your patch, 
that's why I sent it. But I didn't intend to step on your toes.

> Index: text2.C
> ===================================================================
> RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v
> retrieving revision 1.624
> diff -u -a -p -r1.624 text2.C
> --- text2.C     18 Jul 2005 20:34:55 -0000      1.624
> +++ text2.C     21 Jul 2005 04:29:14 -0000
> @@ -622,18 +622,11 @@ void LyXText::insertInset(LCursor & cur,
>  // needed to insert the selection
>  void LyXText::insertStringAsLines(LCursor & cur, string const & str)
>  {
> -       pit_type pit = cur.pit();
> -       pos_type pos = cur.pos();
>         recordUndo(cur);
>  
> -       // only to be sure, should not be neccessary
> -       cur.clearSelection();
> -       cur.buffer().insertStringAsLines(pars_, pit, pos, current_font,
> str, -               autoBreakRows_);
> -
> +       cur.buffer().insertStringAsLines(pars_, cur.pit(), cur.pos(),
> +                                        current_font, str,
> autoBreakRows_); cur.resetAnchor();
> -       setCursor(cur, cur.pit(), pos);
> -       cur.setSelection();
>  }

I prefer that if it works and if it doesn't have any side effects. Less code 
is better.

Jürgen

Reply via email to