fix(macos): check selection in cmd+backspace (#6469)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
- Bugfix: Fixed flickering tooltips on Wayland when the mouse cursor is over them. (#6451)
|
||||
- Bugfix: Fixed `c2.Channel` comparing `false` to the same channel. (#6456)
|
||||
- Bugfix: Fixed an issue where the moderation icon was missing from the Moderation tab. (#6457)
|
||||
- Bugfix: Fixed <kbd>CMD</kbd>+<kbd>Backspace</kbd> not working in the input on macOS if there was a selection. (#6469)
|
||||
- Dev: Added documentation for WebSockets to `wip-plugins.md`. (#6432)
|
||||
- Dev: Enable the hardened runtime on macOS. (#6467)
|
||||
|
||||
|
||||
@@ -136,7 +136,11 @@ void ResizingTextEdit::keyPressEvent(QKeyEvent *event)
|
||||
(event->key() == Qt::Key_Backspace))
|
||||
{
|
||||
QTextCursor cursor = this->textCursor();
|
||||
cursor.movePosition(QTextCursor::StartOfLine, QTextCursor::KeepAnchor);
|
||||
if (!cursor.hasSelection())
|
||||
{
|
||||
cursor.movePosition(QTextCursor::StartOfLine,
|
||||
QTextCursor::KeepAnchor);
|
||||
}
|
||||
cursor.removeSelectedText();
|
||||
this->setTextCursor(cursor);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user