mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Added Ctrl+Backspace support for deleting text span
This commit is contained in:
parent
b128180a15
commit
ea072ad77b
3 changed files with 80 additions and 50 deletions
|
@ -2061,7 +2061,23 @@ namespace IDE.ui
|
|||
|
||||
var keyChar;
|
||||
if (keyChar == '\x7F') // Ctrl+Backspace
|
||||
keyChar = '\b';
|
||||
{
|
||||
int line;
|
||||
int lineChar;
|
||||
GetCursorLineChar(out line, out lineChar);
|
||||
|
||||
int startIdx = CursorTextPos;
|
||||
SelectLeft(line, lineChar, true, false);
|
||||
mSelection = EditSelection(CursorTextPos, startIdx);
|
||||
|
||||
var action = new DeleteSelectionAction(this);
|
||||
action.mMoveCursor = true;
|
||||
mData.mUndoManager.Add(action);
|
||||
action.mCursorTextPos = (.)startIdx;
|
||||
PhysDeleteSelection(true);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (mIgnoreKeyChar)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue