Skip to content

Commit

Permalink
add fix for null exception on autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
halvarsson committed May 9, 2024
1 parent bc7e79e commit 8af4fca
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Autocomplete/PowershellAutocomplete.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ private void TryGenerateSuggestions(int columnOffset = 0)
}
else
{
offset += host.Runes[lineOffset].Count + Environment.NewLine.Length;
if (host.Runes != null)
{
offset += host.Runes[lineOffset].Count + Environment.NewLine.Length;
}
}
}
var text = host.Text.ToString();
Expand Down

0 comments on commit 8af4fca

Please sign in to comment.