Skip to content

Commit

Permalink
Fixes textbox controls crashing after a paste.
Browse files Browse the repository at this point in the history
  • Loading branch information
FellippeHeitor committed Oct 31, 2020
1 parent 0aafc34 commit 02d903f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion InForm/InForm.ui
Original file line number Diff line number Diff line change
Expand Up @@ -5532,7 +5532,9 @@ SUB __UI_CursorAdjustments(This AS LONG)
IF Control(This).VisibleCursor >= (Control(This).Width - ((Control(This).BorderSize + __UI_DefaultCaptionIndent) * ABS(Control(This).HasBorder))) THEN
Control(This).InputViewStart = __UI_FocusedTextBoxChars(Control(This).Cursor) - Control(This).Width / 2 'Control(This).InputViewStart + Control(This).Width / 4
ELSEIF Control(This).VisibleCursor <= 0 THEN
Control(This).InputViewStart = __UI_FocusedTextBoxChars(Control(This).Cursor) - Control(This).Width / 2 'Control(This).InputViewStart - Control(This).Width / 4
IF Control(This).Cursor >= LBOUND(__UI_FocusedTextBoxChars) AND Control(This).Cursor <= UBOUND(__UI_FocusedTextBoxChars) THEN
Control(This).InputViewStart = __UI_FocusedTextBoxChars(Control(This).Cursor) - Control(This).Width / 2 'Control(This).InputViewStart - Control(This).Width / 4
END IF
END IF
IF Control(This).InputViewStart < 0 THEN Control(This).InputViewStart = 0
ELSEIF Control(This).Multiline AND Control(This).Type = __UI_Type_TextBox THEN
Expand Down

0 comments on commit 02d903f

Please sign in to comment.