1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-17 23:56:05 +02:00

CTFE updates, including heap support

This commit is contained in:
Brian Fiete 2020-12-17 04:51:05 -08:00
parent 792d92d014
commit 6bb363fb4b
29 changed files with 3050 additions and 595 deletions

View file

@ -1054,13 +1054,25 @@ namespace IDE
if (var sourceViewPanel = GetActiveSourceViewPanel(true))
sourceViewPanel.RecordHistoryLocation();
int32 charIdx = int32.Parse(cmds[2]).GetValueOrDefault();
StringView loc = cmds[2];
int32 charIdx = int32.Parse(loc).GetValueOrDefault();
if (charIdx < 0)
return;
var sourceViewPanel = ShowSourceFile(cmds[1], null, SourceShowType.Temp);
if (sourceViewPanel == null)
return;
var editWidgetContent = sourceViewPanel.mEditWidget.mEditWidgetContent;
int colonIdx = loc.IndexOf(':');
if (colonIdx != -1)
{
int line = int.Parse(loc.Substring(0, colonIdx)).GetValueOrDefault();
int column = int.Parse(loc.Substring(colonIdx + 1)).GetValueOrDefault();
charIdx = (.)editWidgetContent.GetTextIdx(line, column);
}
if (charIdx < 0)
return;
int line;
int lineChar;
editWidgetContent.GetLineCharAtIdx(charIdx, out line, out lineChar);