summaryrefslogtreecommitdiff
path: root/src/gui/widgets/textfield.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/textfield.cpp')
-rw-r--r--src/gui/widgets/textfield.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/widgets/textfield.cpp b/src/gui/widgets/textfield.cpp
index 58a1f7e18..b4d72a1a7 100644
--- a/src/gui/widgets/textfield.cpp
+++ b/src/gui/widgets/textfield.cpp
@@ -609,7 +609,7 @@ void TextField::caretDeleteToStart()
void TextField::moveCaretWordBack()
{
- const int oldCaret = mCaretPosition;
+ const unsigned int oldCaret = mCaretPosition;
while (mCaretPosition > 0)
{
if (!isWordSeparator(mText[mCaretPosition - 1]))
@@ -629,7 +629,7 @@ void TextField::moveCaretWordBack()
void TextField::moveCaretWordForward()
{
const unsigned sz = static_cast<unsigned>(mText.size());
- const int oldCaret = mCaretPosition;
+ const unsigned int oldCaret = mCaretPosition;
while (mCaretPosition < sz)
{
if (!isWordSeparator(mText[mCaretPosition]))