Treat links as a single character for the purposes of delete, backspace, left and right.

When backspacing at a link the first key selects the whole link the second deletes. Similar for delete, left and right.
This commit is contained in:
James Graham
2026-02-22 14:42:56 +00:00
parent c6313d2951
commit 0a99e90591
4 changed files with 107 additions and 2 deletions

View File

@@ -6,6 +6,8 @@
#include <QObject>
#include <QQmlEngine>
class QTextCursor;
class ChatTextItemHelper;
/**
@@ -119,6 +121,10 @@ private:
bool down();
bool left();
bool right();
bool tab();
bool deleteChar();
@@ -130,4 +136,6 @@ private:
bool cancel();
bool pasteImage();
bool selectLink(QTextCursor &cursor, bool back);
};