diff --git a/src/ChangeLog b/src/ChangeLog index f0f91406f6..34d650509f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2007-04-10 Jürgen Spitzmüller + + * text3.C (dispatch): fix undo in LFUN_QUOTE (bug 3439). + 2007-04-05 Richard Heck * bufferparams.C (writeLaTeX): output lengths as LaTeX strings diff --git a/src/text3.C b/src/text3.C index d14d287a14..7a35bec7ce 100644 --- a/src/text3.C +++ b/src/text3.C @@ -850,22 +850,25 @@ void LyXText::dispatch(LCursor & cur, FuncRequest & cmd) } case LFUN_QUOTE: { - lyx::cap::replaceSelection(cur); Paragraph & par = cur.paragraph(); lyx::pos_type pos = cur.pos(); - char c; - if (pos == 0) - c = ' '; - else if (cur.prevInset() && cur.prevInset()->isSpace()) - c = ' '; - else - c = par.getChar(pos - 1); - - LyXLayout_ptr const & style = par.layout(); - BufferParams const & bufparams = bv->buffer()->params(); + LyXLayout_ptr const & style = par.layout(); if (!style->pass_thru && par.getFontSettings(bufparams, pos).language()->lang() != "hebrew") { + // this avoids a double undo + // FIXME: should not be needed, ideally + if (!cur.selection()) + recordUndo(cur); + lyx::cap::replaceSelection(cur); + pos = cur.pos(); + char c; + if (pos == 0) + c = ' '; + else if (cur.prevInset() && cur.prevInset()->isSpace()) + c = ' '; + else + c = par.getChar(pos - 1); string arg = cmd.argument; if (arg == "single") cur.insert(new InsetQuotes(c, diff --git a/status.14x b/status.14x index 4f9f060762..e42b998e27 100644 --- a/status.14x +++ b/status.14x @@ -45,7 +45,7 @@ What's new * USER INTERFACE: - fix bug where moving the last section up in the toc dialog eats the - last paragraph (bug 3303). + last paragraph (bug 3303) - Handle undo correctly when inserting a plain text file (bug 3204). @@ -61,6 +61,8 @@ What's new - Get ProvidesNatbib working correctly, esp. for egs.layout. +- Fix undo for quotation marks (bug 3439). + * BUILD/INSTALLATION: