Skip to content

Commit 20eeb29

Browse files
committed
Fix crash when gotoline is called
1 parent 661363e commit 20eeb29

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

CodeNav/CodeViewUserControl.xaml.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,16 @@ public void SelectLine(object startLine)
8787
return;
8888
}
8989

90-
LogHelper.Log($"GotoLine {startLineAsInt}");
91-
textSelection.GotoLine(startLineAsInt);
90+
try
91+
{
92+
LogHelper.Log($"GotoLine {startLineAsInt}");
93+
textSelection.GotoLine(startLineAsInt);
94+
}
95+
catch (Exception e)
96+
{
97+
LogHelper.Log($"GotoLine failed: {e.Message}");
98+
return;
99+
}
92100
}
93101

94102
public void RegionsCollapsed(RegionsCollapsedEventArgs e) =>

CodeNav/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="CodeNav.Samir Boulema.19687465-dc94-413d-ad72-6141e90c94d4" Version="2.7" Language="en-US" Publisher="Samir Boulema" />
4+
<Identity Id="CodeNav.Samir Boulema.19687465-dc94-413d-ad72-6141e90c94d4" Version="2.8" Language="en-US" Publisher="Samir Boulema" />
55
<DisplayName>CodeNav</DisplayName>
66
<Description xml:space="preserve">Show the code structure of your current document</Description>
77
<MoreInfo>https://github.com/sboulema/CodeNav</MoreInfo>

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2.7.{build}
1+
version: 2.8.{build}
22
skip_tags: true
33
configuration:
44
- Release

0 commit comments

Comments
 (0)