1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Defer syntax fixes

This commit is contained in:
Brian Fiete 2021-02-17 11:00:02 -08:00
parent 2d76efdaaa
commit 483f579e65
2 changed files with 4 additions and 4 deletions

View file

@ -266,7 +266,7 @@ namespace IDE.ui
IdSpan liveCharIdData; IdSpan liveCharIdData;
String liveText = scope:: String(); String liveText = scope:: String();
app.FindProjectSourceContent(projectSource, out liveCharIdData, true, liveText, null); app.FindProjectSourceContent(projectSource, out liveCharIdData, true, liveText, null);
defer(stack) liveCharIdData.Dispose(); defer:: liveCharIdData.Dispose();
var compileInstance = IDEApp.sApp.mWorkspace.GetProjectSourceCompileInstance(projectSource, mHotIdx); var compileInstance = IDEApp.sApp.mWorkspace.GetProjectSourceCompileInstance(projectSource, mHotIdx);
if (compileInstance == null) if (compileInstance == null)

View file

@ -1244,7 +1244,7 @@ namespace IDE.ui
{ {
var undoBatchStart = new UndoBatchStart("pasteText"); var undoBatchStart = new UndoBatchStart("pasteText");
mData.mUndoManager.Add(undoBatchStart); mData.mUndoManager.Add(undoBatchStart);
defer(stack) mData.mUndoManager.Add(undoBatchStart.mBatchEnd); defer:: mData.mUndoManager.Add(undoBatchStart.mBatchEnd);
} }
if (HasSelection()) if (HasSelection())
@ -3644,7 +3644,7 @@ namespace IDE.ui
bool hadSuggestion = false; bool hadSuggestion = false;
List<String> suggestions = scope List<String>(); List<String> suggestions = scope List<String>();
defer (scope) ClearAndDeleteItems(suggestions); defer ClearAndDeleteItems(suggestions);
spellChecker.GetSuggestions(word, suggestions); spellChecker.GetSuggestions(word, suggestions);
for (var suggestion in suggestions) for (var suggestion in suggestions)
{ {
@ -3789,7 +3789,7 @@ namespace IDE.ui
else if (bfSystem != null) else if (bfSystem != null)
{ {
parser = bfSystem.CreateEmptyParser(null); parser = bfSystem.CreateEmptyParser(null);
defer(stack) delete parser; defer:: delete parser;
var text = scope String(); var text = scope String();
mEditWidget.GetText(text); mEditWidget.GetText(text);
parser.SetSource(text, mSourceViewPanel.mFilePath); parser.SetSource(text, mSourceViewPanel.mFilePath);