fix(desktop): do nothing if history is empty

This commit is contained in:
Anna 2020-11-17 22:54:58 -05:00
parent 71c310d760
commit 1116e19dde
1 changed files with 4 additions and 0 deletions

View File

@ -241,6 +241,10 @@ namespace XIVChat_Desktop {
}
private void ArrowNavigate(TextBox textBox, bool up) {
if (this.History.Count == 0) {
return;
}
var caretLine = textBox.GetLineIndexFromCharacterIndex(textBox.CaretIndex);
var inFirstLine = caretLine == 0;
var inLastLine = caretLine == textBox.LineCount - 1;