1
0
Fork 0
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:
Brian Fiete 2020-05-07 11:48:10 -07:00
parent b128180a15
commit ea072ad77b
3 changed files with 80 additions and 50 deletions

View file

@ -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)
{