small fixes

This commit is contained in:
MihailRis
2024-05-18 16:57:04 +03:00
parent d3c9911640
commit 535c7d8326
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -369,7 +369,7 @@ void TextBox::click(GUI*, int x, int y) {
}
void TextBox::mouseMove(GUI*, int x, int y) {
ssize_t index = calcIndexAt(x, y);
ptrdiff_t index = calcIndexAt(x, y);
setCaret(index);
extendSelection(index);
resetMaxLocalCaret();
@@ -656,7 +656,7 @@ void TextBox::setCaret(size_t position) {
}
}
void TextBox::setCaret(ssize_t position) {
void TextBox::setCaret(ptrdiff_t position) {
if (position < 0) {
setCaret(static_cast<size_t>(input.length() + position + 1));
} else {