Skip to content
Permalink
Browse files

Fix crash when moving caret left then pressing control down

  • Loading branch information...
UnknownShadow200 committed Apr 10, 2019
1 parent 69e59db commit dfc203a818cbf2b2596cda9df4c8543092555043
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/Widgets.c
@@ -1694,9 +1694,10 @@ static void ChatInputWidget_DownKey(struct InputWidget* w) {

if (InputWidget_ControlDown()) {
lines = w->GetMaxLines();
if (w->CaretPos == -1 || w->CaretPos >= (lines - 1) * INPUTWIDGET_LEN) return;
if (w->CaretPos == -1) return;

w->CaretPos += INPUTWIDGET_LEN;
if (w->CaretPos >= w->Text.length) { w->CaretPos = -1; }
InputWidget_UpdateCaret(w);
return;
}

0 comments on commit dfc203a

Please sign in to comment.
You can’t perform that action at this time.