mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 23:34:10 +02:00
Property [Inline] changes, large container/string fixes, reload fixes
This commit is contained in:
parent
c531ade968
commit
becd673914
9 changed files with 45 additions and 37 deletions
|
@ -854,7 +854,7 @@ namespace Beefy.widgets
|
|||
var action = new DeleteSelectionAction(this);
|
||||
action.mMoveCursor = moveCursor;
|
||||
mData.mUndoManager.Add(action);
|
||||
PhysDeleteSelection();
|
||||
PhysDeleteSelection(moveCursor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
[AttributeUsage(.Method /*1*/ | .Invocation | .Property)]
|
||||
[AttributeUsage(.Method /*1*/ | .Invocation)]
|
||||
public struct InlineAttribute : Attribute
|
||||
{
|
||||
|
||||
|
|
|
@ -15,15 +15,15 @@ namespace System
|
|||
mValue = value;
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public bool HasValue
|
||||
{
|
||||
[Inline]
|
||||
get { return mHasValue; }
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public T Value
|
||||
{
|
||||
[Inline]
|
||||
get
|
||||
{
|
||||
if (!mHasValue)
|
||||
|
@ -35,9 +35,9 @@ namespace System
|
|||
}
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public ref T ValueRef
|
||||
{
|
||||
[Inline]
|
||||
get mut
|
||||
{
|
||||
if (!mHasValue)
|
||||
|
|
|
@ -51,64 +51,66 @@ namespace System
|
|||
return Span<T>(array);
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public int Length
|
||||
{
|
||||
[Inline]
|
||||
get
|
||||
{
|
||||
return mLength;
|
||||
}
|
||||
|
||||
[Inline]
|
||||
set mut
|
||||
{
|
||||
mLength = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public T* Ptr
|
||||
{
|
||||
[Inline]
|
||||
get
|
||||
{
|
||||
return mPtr;
|
||||
}
|
||||
|
||||
[Inline]
|
||||
set mut
|
||||
{
|
||||
mPtr = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public T* EndPtr
|
||||
{
|
||||
[Inline]
|
||||
get
|
||||
{
|
||||
return mPtr + mLength;
|
||||
}
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public bool IsEmpty
|
||||
{
|
||||
[Inline]
|
||||
get
|
||||
{
|
||||
return mLength == 0;
|
||||
}
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public bool IsNull
|
||||
{
|
||||
[Inline]
|
||||
get
|
||||
{
|
||||
return mPtr == null;
|
||||
}
|
||||
}
|
||||
|
||||
[Inline]
|
||||
public ref T this[int index]
|
||||
{
|
||||
[Inline]
|
||||
get
|
||||
{
|
||||
return ref mPtr[index];
|
||||
|
@ -332,9 +334,9 @@ namespace System
|
|||
}
|
||||
|
||||
|
||||
[Inline]
|
||||
public T* Ptr
|
||||
{
|
||||
[Inline]
|
||||
get
|
||||
{
|
||||
return mPtr;
|
||||
|
|
|
@ -685,7 +685,7 @@ namespace System
|
|||
void Realloc(int newSize)
|
||||
{
|
||||
Debug.Assert(AllocSize > 0, "String has been frozen");
|
||||
Debug.Assert((uint_strsize)newSize <= cSizeFlags);
|
||||
Debug.Assert((uint)newSize <= cSizeFlags);
|
||||
char8* newPtr = new:this char8[newSize]*;
|
||||
Internal.MemCpy(newPtr, Ptr, mLength);
|
||||
if (IsDynAlloc)
|
||||
|
@ -703,7 +703,7 @@ namespace System
|
|||
void Realloc(char8* newPtr, int newSize)
|
||||
{
|
||||
Debug.Assert(AllocSize > 0, "String has been frozen");
|
||||
Debug.Assert((uint_strsize)newSize <= cSizeFlags);
|
||||
Debug.Assert((uint)newSize <= cSizeFlags);
|
||||
Internal.MemCpy(newPtr, Ptr, mLength);
|
||||
if (IsDynAlloc)
|
||||
delete:this mPtr;
|
||||
|
|
|
@ -429,6 +429,12 @@ namespace System.Collections.Generic
|
|||
#endif
|
||||
}
|
||||
|
||||
public void Insert(int index, Span<T> items)
|
||||
{
|
||||
if (items.Length == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
public void RemoveAt(int index)
|
||||
{
|
||||
if (((int)Internal.UnsafeCastToPtr(this) & 0xFFFF) == 0x4BA0)
|
||||
|
|
|
@ -794,9 +794,9 @@ namespace IDE.ui
|
|||
}
|
||||
else if (memberVals0 == ":repeat")
|
||||
{
|
||||
int32 startIdx = int32.Parse(scope String(memberVals[1]));
|
||||
int32 count = int32.Parse(scope String(memberVals[2]));
|
||||
int32 maxShow = int32.Parse(scope String(memberVals[3]));
|
||||
int startIdx = Int.Parse(scope String(memberVals[1]));
|
||||
int count = Int.Parse(scope String(memberVals[2]));
|
||||
int maxShow = Int.Parse(scope String(memberVals[3]));
|
||||
|
||||
String displayStr = new String(memberVals[4]);
|
||||
String evalStr = new String(memberVals[5]);
|
||||
|
@ -814,7 +814,7 @@ namespace IDE.ui
|
|||
watchSeriesInfo.mEvalTemplate = evalStr;
|
||||
watchSeriesInfo.mStartIdx = startIdx;
|
||||
watchSeriesInfo.mCount = count;
|
||||
watchSeriesInfo.mShowPageSize = maxShow;
|
||||
watchSeriesInfo.mShowPageSize = (int32)maxShow;
|
||||
watchSeriesInfo.mShowPages = 1;
|
||||
|
||||
var memberWatch = new PendingWatch();
|
||||
|
|
|
@ -354,7 +354,7 @@ namespace IDE.ui
|
|||
|
||||
editWidgetContent.mHadPersistentTextPositionDeletes = false;
|
||||
editWidgetContent.mSelection = EditSelection(pos, pos + len);
|
||||
editWidgetContent.DeleteSelection();
|
||||
editWidgetContent.DeleteSelection(false);
|
||||
|
||||
// If we have modified a section of text containing breakpoint (for example), this gets encoded by
|
||||
// 'adds' of the new lines and then 'removes' of the old lines. We do a Levenshtein search for
|
||||
|
@ -420,7 +420,7 @@ namespace IDE.ui
|
|||
editWidgetContent.CursorTextPos = posTo;
|
||||
var subStr = scope String();
|
||||
subStr.Append(text, posFrom, len);
|
||||
editWidgetContent.InsertAtCursor(subStr);
|
||||
editWidgetContent.InsertAtCursor(subStr, .NoMoveCursor);
|
||||
|
||||
if (cmdParts.Count >= 5)
|
||||
{
|
||||
|
|
|
@ -434,9 +434,9 @@ namespace IDE.ui
|
|||
public String mDisplayTemplate ~ delete _;
|
||||
public String mEvalTemplate ~ delete _;
|
||||
public int32 mStartMemberIdx;
|
||||
public int32 mStartIdx;
|
||||
public int32 mCount;
|
||||
public int32 mCurCount; // When counting up unsized series
|
||||
public int mStartIdx;
|
||||
public int mCount;
|
||||
public int mCurCount; // When counting up unsized series
|
||||
public int32 mShowPages;
|
||||
public int32 mShowPageSize;
|
||||
public String mAddrs ~ delete _;
|
||||
|
@ -1262,10 +1262,10 @@ namespace IDE.ui
|
|||
if (continuationDone)
|
||||
{
|
||||
// We finally have the count
|
||||
mWatchSeriesInfo.mCount = (int32)totalCount;
|
||||
mWatchSeriesInfo.mCount = totalCount;
|
||||
}
|
||||
}
|
||||
mWatchSeriesInfo.mCurCount = (int32)totalCount;
|
||||
mWatchSeriesInfo.mCurCount = totalCount;
|
||||
|
||||
int showCount = Math.Min(totalCount, mWatchSeriesInfo.mShowPages * mWatchSeriesInfo.mShowPageSize);
|
||||
|
||||
|
@ -1423,7 +1423,7 @@ namespace IDE.ui
|
|||
{
|
||||
if (mWatchSeriesInfo.mMoreButton.mDisabled)
|
||||
return;
|
||||
mWatchSeriesInfo.mShowPages = Math.Min(mWatchSeriesInfo.mShowPages + 1, 1 + (mWatchSeriesInfo.mCurCount + mWatchSeriesInfo.mShowPageSize - 1) / mWatchSeriesInfo.mShowPageSize);
|
||||
mWatchSeriesInfo.mShowPages = (int32)Math.Min(mWatchSeriesInfo.mShowPages + 1, 1 + (mWatchSeriesInfo.mCurCount + mWatchSeriesInfo.mShowPageSize - 1) / mWatchSeriesInfo.mShowPageSize);
|
||||
mWatchSeriesInfo.mMoreButton.mVisible = false;
|
||||
mWatchSeriesInfo.mLessButton.mVisible = false;
|
||||
});
|
||||
|
@ -2297,9 +2297,9 @@ namespace IDE.ui
|
|||
}
|
||||
else if (memberVals0 == ":repeat")
|
||||
{
|
||||
int32 startIdx = int32.Parse(scope String(memberVals[1]));
|
||||
int32 count = int32.Parse(scope String(memberVals[2]));
|
||||
int32 maxShow = int32.Parse(scope String(memberVals[3]));
|
||||
int startIdx = Int.Parse(scope String(memberVals[1]));
|
||||
int count = Int.Parse(scope String(memberVals[2]));
|
||||
int maxShow = Int.Parse(scope String(memberVals[3]));
|
||||
|
||||
String displayStr = scope String(memberVals[4]);
|
||||
String evalStr = scope String(memberVals[5]);
|
||||
|
@ -2318,7 +2318,7 @@ namespace IDE.ui
|
|||
watchSeriesInfo.mEvalTemplate = new String(evalStr);
|
||||
watchSeriesInfo.mStartIdx = startIdx;
|
||||
watchSeriesInfo.mCount = count;
|
||||
watchSeriesInfo.mShowPageSize = maxShow;
|
||||
watchSeriesInfo.mShowPageSize = (int32)maxShow;
|
||||
watchSeriesInfo.mShowPages = 1;
|
||||
|
||||
WatchListViewItem memberItem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue