From 8fb2506ab6891222f557d81a87b7ab891baa5ef7 Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 27 Aug 2002 11:27:47 +0000 Subject: [PATCH] "delete" fixes from michael git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH-1_2_X@5116 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 8 ++++++++ src/insets/insettabular.C | 3 ++- src/insets/insettext.C | 6 +++--- status.12x | 2 ++ 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 2e9a2aac23..5dc7ce0740 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,11 @@ +2002-08-07 Juergen Vigna + + * insettabular.C (localDispatch): make delete not put the stuff + in the clipboard only do this on a cut operation. + + * insettext.C (localDispatch): make delete and backspace not put + selected stuff to the clipboard. + 2002-08-21 Jean-Marc Lasgouttes * insetcite.C (latex): fix obvious warning diff --git a/src/insets/insettabular.C b/src/insets/insettabular.C index b0fa613845..1cdbdd60c7 100644 --- a/src/insets/insettabular.C +++ b/src/insets/insettabular.C @@ -1113,7 +1113,6 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action, case LFUN_UP_PARAGRAPH: case LFUN_UP_PARAGRAPHSEL: case LFUN_BACKSPACE: - case LFUN_DELETE: case LFUN_HOME: case LFUN_HOMESEL: case LFUN_END: @@ -1147,6 +1146,8 @@ InsetTabular::localDispatch(BufferView * bv, kb_action action, case LFUN_CUT: if (!copySelection(bv)) break; + // no break here! + case LFUN_DELETE: setUndo(bv, Undo::DELETE, bv->text->cursor.par(), bv->text->cursor.par()->next()); diff --git a/src/insets/insettext.C b/src/insets/insettext.C index 07083e955f..6b626e1828 100644 --- a/src/insets/insettext.C +++ b/src/insets/insettext.C @@ -1272,7 +1272,7 @@ InsetText::localDispatch(BufferView * bv, bv->setState(); if (lyxrc.auto_region_delete) { if (lt->selection.set()) { - lt->cutSelection(bv, false); + lt->cutSelection(bv, false, false); } } lt->clearSelection(); @@ -1343,7 +1343,7 @@ InsetText::localDispatch(BufferView * bv, setUndo(bv, Undo::DELETE, lt->cursor.par(), lt->cursor.par()->next()); if (lt->selection.set()) - lt->cutSelection(bv); + lt->cutSelection(bv, true, false); else lt->backspace(bv); updwhat = CURSOR_PAR; @@ -1355,7 +1355,7 @@ InsetText::localDispatch(BufferView * bv, setUndo(bv, Undo::DELETE, lt->cursor.par(), lt->cursor.par()->next()); if (lt->selection.set()) { - lt->cutSelection(bv); + lt->cutSelection(bv, true, false); } else { lt->Delete(bv); } diff --git a/status.12x b/status.12x index 1103eacf34..a2885b4bb0 100644 --- a/status.12x +++ b/status.12x @@ -42,3 +42,5 @@ What's new - when loading a font fails, show the name of the said font +- harmonize the behavior of delete and backspace in main text, + insettext, and tabulars, i.e. don't put stuff into the clipboard