mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Fixed crash when closing with autocomplete up
This commit is contained in:
parent
628a1340b2
commit
a469707377
4 changed files with 40 additions and 20 deletions
8
IDE/mintest/src/zop/Zoggle.bf
Normal file
8
IDE/mintest/src/zop/Zoggle.bf
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
namespace Mintest.zop
|
||||||
|
{
|
||||||
|
class Zoggle
|
||||||
|
{
|
||||||
|
//ZapZap mZoop;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -2142,6 +2142,8 @@ namespace IDE.ui
|
||||||
if ((mAutoCompleteListWidget != null) && (mAutoCompleteListWidget.mWidgetWindow == null))
|
if ((mAutoCompleteListWidget != null) && (mAutoCompleteListWidget.mWidgetWindow == null))
|
||||||
{
|
{
|
||||||
mAutoCompleteListWidget.Cleanup();
|
mAutoCompleteListWidget.Cleanup();
|
||||||
|
if (mListWindow?.mRootWidget == mAutoCompleteListWidget)
|
||||||
|
mListWindow.mRootWidget = null;
|
||||||
delete mAutoCompleteListWidget;
|
delete mAutoCompleteListWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2154,6 +2156,8 @@ namespace IDE.ui
|
||||||
if ((mInvokeWidget != null) && (mInvokeWidget.mWidgetWindow == null))
|
if ((mInvokeWidget != null) && (mInvokeWidget.mWidgetWindow == null))
|
||||||
{
|
{
|
||||||
mInvokeWidget.Cleanup();
|
mInvokeWidget.Cleanup();
|
||||||
|
if (mInvokeWindow?.mRootWidget == mInvokeWidget)
|
||||||
|
mInvokeWindow.mRootWidget = null;
|
||||||
delete mInvokeWidget;
|
delete mInvokeWidget;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -218,6 +218,23 @@ namespace IDE.ui
|
||||||
bool mHasCustomColors;
|
bool mHasCustomColors;
|
||||||
FastCursorState mFastCursorState ~ delete _;
|
FastCursorState mFastCursorState ~ delete _;
|
||||||
|
|
||||||
|
|
||||||
|
public List<PersistentTextPosition> PersistentTextPositions
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return ((Data)mData).mPersistentTextPositions;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public Data Data
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return (Data)mData;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public this(EditWidgetContent refContent = null) : base(refContent)
|
public this(EditWidgetContent refContent = null) : base(refContent)
|
||||||
{
|
{
|
||||||
mAllowVirtualCursor = true;
|
mAllowVirtualCursor = true;
|
||||||
|
@ -246,22 +263,6 @@ namespace IDE.ui
|
||||||
return new Data();
|
return new Data();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<PersistentTextPosition> PersistentTextPositions
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return ((Data)mData).mPersistentTextPositions;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public Data Data
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return (Data)mData;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[CallingConvention(.Stdcall), CLink]
|
[CallingConvention(.Stdcall), CLink]
|
||||||
static extern char8* BfDiff_DiffText(char8* text1, char8* text2);
|
static extern char8* BfDiff_DiffText(char8* text1, char8* text2);
|
||||||
|
|
||||||
|
|
|
@ -618,6 +618,13 @@ namespace IDE.ui
|
||||||
DeleteAndNullify!(mQueuedAutoComplete);
|
DeleteAndNullify!(mQueuedAutoComplete);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void CloseAutocomplete()
|
||||||
|
{
|
||||||
|
var editWidgetContent = (SourceEditWidgetContent)mEditWidget.Content;
|
||||||
|
if (editWidgetContent.mAutoComplete != null)
|
||||||
|
editWidgetContent.mAutoComplete.Close();
|
||||||
|
}
|
||||||
|
|
||||||
void SetupEditWidget()
|
void SetupEditWidget()
|
||||||
{
|
{
|
||||||
if (mEditWidget.mParent == null)
|
if (mEditWidget.mParent == null)
|
||||||
|
@ -2391,8 +2398,8 @@ namespace IDE.ui
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void RemovedFromParent(Widget previousParent, WidgetWindow window)
|
protected override void RemovedFromWindow()
|
||||||
{
|
{
|
||||||
if (mHoverWatch != null)
|
if (mHoverWatch != null)
|
||||||
mHoverWatch.Close();
|
mHoverWatch.Close();
|
||||||
|
|
||||||
|
@ -2406,8 +2413,8 @@ namespace IDE.ui
|
||||||
sourceEditWidgetContent.mAutoComplete.Close();
|
sourceEditWidgetContent.mAutoComplete.Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
base.RemovedFromParent(previousParent, window);
|
base.RemovedFromWindow();
|
||||||
CloseOldVersion();
|
CloseOldVersion();
|
||||||
|
|
||||||
if (NeedsPostRemoveUpdate)
|
if (NeedsPostRemoveUpdate)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue