Skip to content

Commit

Permalink
fix: NullReferenceException in AutoComplete
Browse files Browse the repository at this point in the history
  • Loading branch information
Computerdores committed Apr 17, 2024
1 parent 8746a9d commit c2b32a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion BetterTerminal/BetterTerminal/VanillinPlusTerminal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ public class VanillinPlusTerminal : VanillinTerminal {
} else {
string[] words = driver.Input.Split(' ');
if (words.Length == 1) {
driver.Input = FindCommand(words[0]).GetName() + " ";
if (FindCommand(words[0]) is { } command)
driver.Input = command.GetName() + " ";
} else {
ICommand cmd = FindCommand(words[0]);
if (cmd is IPredictable predictable) {
Expand Down

0 comments on commit c2b32a4

Please sign in to comment.