1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-14 14:24:10 +02:00

fix readonly editwidget deletions

This commit is contained in:
EinBurgbauer 2021-04-04 10:37:33 +02:00
parent f5a863d55a
commit 9772364a6d

View file

@ -1699,6 +1699,8 @@ namespace Beefy.widgets
base.KeyChar(keyChar);
if (keyChar == '\x7F') // Ctrl+Backspace
{
if (!CheckReadOnly())
{
int line;
int lineChar;
@ -1713,6 +1715,7 @@ namespace Beefy.widgets
mData.mUndoManager.Add(action);
action.mCursorTextPos = (.)startIdx;
PhysDeleteSelection(true);
}
return;
}
@ -1721,9 +1724,6 @@ namespace Beefy.widgets
mCursorBlinkTicks = 0;
if (useChar == '\x7F') // Ctrl+Backspace
useChar = '\b';
if (useChar == '\b')
{
if (!CheckReadOnly())
@ -2510,6 +2510,8 @@ namespace Beefy.widgets
break;
case KeyCode.Delete:
if (mWidgetWindow.IsKeyDown(.Control))
{
if (!CheckReadOnly())
{
if (mWidgetWindow.IsKeyDown(.Shift))
{
@ -2537,6 +2539,7 @@ namespace Beefy.widgets
mData.mUndoManager.Add(action);
action.mCursorTextPos = (.)startIdx;
PhysDeleteSelection(true);
}
break;
}