mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Error checking for ShowCode
This commit is contained in:
parent
7ddd9a205d
commit
c46e86f416
1 changed files with 5 additions and 3 deletions
|
@ -1054,15 +1054,17 @@ namespace IDE
|
|||
if (var sourceViewPanel = GetActiveSourceViewPanel(true))
|
||||
sourceViewPanel.RecordHistoryLocation();
|
||||
|
||||
int32 char8Idx = int32.Parse(cmds[2]).GetValueOrDefault();
|
||||
int32 charIdx = int32.Parse(cmds[2]).GetValueOrDefault();
|
||||
if (charIdx < 0)
|
||||
return;
|
||||
var sourceViewPanel = ShowSourceFile(cmds[1], null, SourceShowType.Temp);
|
||||
if (sourceViewPanel == null)
|
||||
return;
|
||||
var editWidgetContent = sourceViewPanel.mEditWidget.mEditWidgetContent;
|
||||
int line;
|
||||
int lineChar;
|
||||
editWidgetContent.GetLineCharAtIdx(char8Idx, out line, out lineChar);
|
||||
sourceViewPanel.ShowFileLocation(char8Idx, .Always);
|
||||
editWidgetContent.GetLineCharAtIdx(charIdx, out line, out lineChar);
|
||||
sourceViewPanel.ShowFileLocation(charIdx, .Always);
|
||||
case "ShowCodeAddr":
|
||||
var sourceViewPanel = GetActiveSourceViewPanel(true);
|
||||
if (sourceViewPanel != null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue