mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-25 19:18:01 +02:00
Fixed a few read-only modifications
This commit is contained in:
parent
9ede79e29d
commit
9a2d200b70
2 changed files with 6 additions and 3 deletions
|
@ -402,12 +402,10 @@ namespace Beefy.widgets
|
||||||
|
|
||||||
if (mOffset < 0)
|
if (mOffset < 0)
|
||||||
{
|
{
|
||||||
//mText = deleteCharAction.mText + mText;
|
|
||||||
mText.Insert(0, deleteCharAction.mText);
|
mText.Insert(0, deleteCharAction.mText);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//mText = mText + deleteCharAction.mText;
|
|
||||||
mText.Append(deleteCharAction.mText);
|
mText.Append(deleteCharAction.mText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1653,6 +1651,8 @@ namespace Beefy.widgets
|
||||||
|
|
||||||
public void InsertCharPair(String char8Pair)
|
public void InsertCharPair(String char8Pair)
|
||||||
{
|
{
|
||||||
|
if (CheckReadOnly())
|
||||||
|
return;
|
||||||
InsertAtCursor(char8Pair);
|
InsertAtCursor(char8Pair);
|
||||||
MoveCursorToIdx(CursorTextPos - 1);
|
MoveCursorToIdx(CursorTextPos - 1);
|
||||||
mJustInsertedCharPair = true;
|
mJustInsertedCharPair = true;
|
||||||
|
|
|
@ -1985,6 +1985,9 @@ namespace IDE.ui
|
||||||
|
|
||||||
public bool ToggleComment()
|
public bool ToggleComment()
|
||||||
{
|
{
|
||||||
|
if (CheckReadOnly())
|
||||||
|
return false;
|
||||||
|
|
||||||
if ((HasSelection()) && (mSelection.Value.Length > 1))
|
if ((HasSelection()) && (mSelection.Value.Length > 1))
|
||||||
{
|
{
|
||||||
var startLineAndCol = CursorLineAndColumn ;
|
var startLineAndCol = CursorLineAndColumn ;
|
||||||
|
@ -2748,7 +2751,7 @@ namespace IDE.ui
|
||||||
/// param.isRepeat = "Whether the key is repeated"
|
/// param.isRepeat = "Whether the key is repeated"
|
||||||
public override void KeyDown(KeyCode keyCode, bool isRepeat)
|
public override void KeyDown(KeyCode keyCode, bool isRepeat)
|
||||||
{
|
{
|
||||||
mIgnoreKeyChar = false;
|
mIgnoreKeyChar = false;
|
||||||
|
|
||||||
if (((keyCode == .Up) || (keyCode == .Down)) &&
|
if (((keyCode == .Up) || (keyCode == .Down)) &&
|
||||||
(mAutoComplete != null) && (mAutoComplete.IsShowing()) && (mAutoComplete.mListWindow != null) &&
|
(mAutoComplete != null) && (mAutoComplete.IsShowing()) && (mAutoComplete.mListWindow != null) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue