mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-11 04:52:21 +02:00
Fixed Ctrl+Backspace, fixed muiltiline clipping paste-then-undo error
This commit is contained in:
parent
e62104a7d1
commit
5879469933
2 changed files with 13 additions and 9 deletions
|
@ -1074,13 +1074,6 @@ namespace Beefy.widgets
|
||||||
bool atEnd = textPos == mData.mTextLength;
|
bool atEnd = textPos == mData.mTextLength;
|
||||||
|
|
||||||
String insertStr = text;
|
String insertStr = text;
|
||||||
if (!mIsMultiline)
|
|
||||||
{
|
|
||||||
int crPos = insertStr.IndexOf('\n');
|
|
||||||
if (crPos != -1)
|
|
||||||
insertStr = scope:: String(text, 0, crPos);
|
|
||||||
}
|
|
||||||
|
|
||||||
InsertText((int32)textPos, insertStr);
|
InsertText((int32)textPos, insertStr);
|
||||||
|
|
||||||
if (atEnd)
|
if (atEnd)
|
||||||
|
@ -1130,11 +1123,15 @@ namespace Beefy.widgets
|
||||||
{
|
{
|
||||||
scope AutoBeefPerf("EWC.InsertAtCursor");
|
scope AutoBeefPerf("EWC.InsertAtCursor");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//String insertText = scope String();
|
//String insertText = scope String();
|
||||||
|
|
||||||
String insertString = theString;
|
String insertString = theString;
|
||||||
|
if (!mIsMultiline)
|
||||||
|
{
|
||||||
|
int crPos = insertString.IndexOf('\n');
|
||||||
|
if (crPos != -1)
|
||||||
|
insertString = scope:: String(theString, 0, crPos);
|
||||||
|
}
|
||||||
|
|
||||||
bool doCheck = true;
|
bool doCheck = true;
|
||||||
|
|
||||||
|
@ -1669,6 +1666,9 @@ namespace Beefy.widgets
|
||||||
|
|
||||||
mCursorBlinkTicks = 0;
|
mCursorBlinkTicks = 0;
|
||||||
|
|
||||||
|
if (useChar == '\x7F') // Ctrl+Backspace
|
||||||
|
useChar = '\b';
|
||||||
|
|
||||||
if (useChar == '\b')
|
if (useChar == '\b')
|
||||||
{
|
{
|
||||||
if (!CheckReadOnly())
|
if (!CheckReadOnly())
|
||||||
|
|
|
@ -2059,6 +2059,10 @@ namespace IDE.ui
|
||||||
{
|
{
|
||||||
scope AutoBeefPerf("SEWC.KeyChar");
|
scope AutoBeefPerf("SEWC.KeyChar");
|
||||||
|
|
||||||
|
var keyChar;
|
||||||
|
if (keyChar == '\x7F') // Ctrl+Backspace
|
||||||
|
keyChar = '\b';
|
||||||
|
|
||||||
if (mIgnoreKeyChar)
|
if (mIgnoreKeyChar)
|
||||||
{
|
{
|
||||||
mIgnoreKeyChar = false;
|
mIgnoreKeyChar = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue