mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
* Text3.cpp (doDispatch): fix the behaviour of word-delete-forward,
word-delete-backward and line-delete when there is a selection. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19025 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
ae9dad1770
commit
f4b65f4e96
@ -79,7 +79,6 @@ using cap::cutSelection;
|
||||
using cap::pasteFromStack;
|
||||
using cap::pasteClipboard;
|
||||
using cap::replaceSelection;
|
||||
using cap::saveSelection;
|
||||
|
||||
using support::isStrUnsignedInt;
|
||||
using support::token;
|
||||
@ -436,20 +435,26 @@ void Text::dispatch(Cursor & cur, FuncRequest & cmd)
|
||||
}
|
||||
|
||||
case LFUN_WORD_DELETE_FORWARD:
|
||||
cur.clearSelection();
|
||||
deleteWordForward(cur);
|
||||
if (cur.selection()) {
|
||||
cutSelection(cur, true, false);
|
||||
} else
|
||||
deleteWordForward(cur);
|
||||
finishChange(cur, false);
|
||||
break;
|
||||
|
||||
case LFUN_WORD_DELETE_BACKWARD:
|
||||
cur.clearSelection();
|
||||
deleteWordBackward(cur);
|
||||
if (cur.selection()) {
|
||||
cutSelection(cur, true, false);
|
||||
} else
|
||||
deleteWordBackward(cur);
|
||||
finishChange(cur, false);
|
||||
break;
|
||||
|
||||
case LFUN_LINE_DELETE:
|
||||
cur.clearSelection();
|
||||
deleteLineForward(cur);
|
||||
if (cur.selection()) {
|
||||
cutSelection(cur, true, false);
|
||||
} else
|
||||
deleteLineForward(cur);
|
||||
finishChange(cur, false);
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user