mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixed shift+(home/end)
This commit is contained in:
parent
77aec1d3eb
commit
748920e8fd
1 changed files with 10 additions and 2 deletions
|
@ -255,7 +255,11 @@ void SplitInput::installKeyPressedEvent()
|
|||
else if (event->key() == Qt::Key_Home)
|
||||
{
|
||||
QTextCursor cursor = this->ui_.textEdit->textCursor();
|
||||
cursor.movePosition(QTextCursor::Start);
|
||||
cursor.movePosition(
|
||||
QTextCursor::Start,
|
||||
event->modifiers() & Qt::KeyboardModifier::ShiftModifier
|
||||
? QTextCursor::MoveMode::KeepAnchor
|
||||
: QTextCursor::MoveMode::MoveAnchor);
|
||||
this->ui_.textEdit->setTextCursor(cursor);
|
||||
|
||||
event->accept();
|
||||
|
@ -263,7 +267,11 @@ void SplitInput::installKeyPressedEvent()
|
|||
else if (event->key() == Qt::Key_End)
|
||||
{
|
||||
QTextCursor cursor = this->ui_.textEdit->textCursor();
|
||||
cursor.movePosition(QTextCursor::End);
|
||||
cursor.movePosition(
|
||||
QTextCursor::End,
|
||||
event->modifiers() & Qt::KeyboardModifier::ShiftModifier
|
||||
? QTextCursor::MoveMode::KeepAnchor
|
||||
: QTextCursor::MoveMode::MoveAnchor);
|
||||
this->ui_.textEdit->setTextCursor(cursor);
|
||||
|
||||
event->accept();
|
||||
|
|
Loading…
Reference in a new issue