mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Refactored cursorToEnd.
This commit is contained in:
parent
f6d0cc9e6b
commit
bfe87b699a
1 changed files with 4 additions and 6 deletions
|
@ -245,16 +245,14 @@ void SplitInput::installKeyPressedEvent()
|
||||||
// Then simply get currMsg_.
|
// Then simply get currMsg_.
|
||||||
this->ui_.textEdit->setText(this->currMsg_);
|
this->ui_.textEdit->setText(this->currMsg_);
|
||||||
} else if (message != this->currMsg_) {
|
} else if (message != this->currMsg_) {
|
||||||
// If user is already in current message
|
// If user are already in current message
|
||||||
// And type something new
|
// And type something new
|
||||||
// Then replace currMsg_ with new one.
|
// Then replace currMsg_ with new one.
|
||||||
this->currMsg_ = message;
|
this->currMsg_ = message;
|
||||||
} else {
|
|
||||||
// If user is already in current message
|
|
||||||
// And no changed text
|
|
||||||
// Then don't touch cursos.
|
|
||||||
cursorToEnd = false;
|
|
||||||
}
|
}
|
||||||
|
// If user is already in current message
|
||||||
|
// Then don't touch cursos.
|
||||||
|
cursorToEnd = (message == this->prevMsg_.at(this->prevIndex_ - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cursorToEnd) {
|
if (cursorToEnd) {
|
||||||
|
|
Loading…
Reference in a new issue