Validate new terminal position index on insert. (#507)

This commit is contained in:
Max Risuhin authored and Felix committed 2019-08-29 21:59:10 +02:00
1 parent 5eecbc6718
commit d14236d502
1 file changed
+1 -1
@@ -356,7 +356,7 @@ namespace FluentTerminal.App.ViewModels
terminal.CloseRightTabsRequested += Terminal_CloseRightTabsRequested;
terminal.CloseOtherTabsRequested += Terminal_CloseOtherTabsRequested;
terminal.DuplicateTabRequested += Terminal_DuplicateTabRequested;
Terminals.Insert(position, terminal);
Terminals.Insert(Math.Min(position, Terminals.Count), terminal);
SelectedTerminal = terminal;
});