reposition the cursor for the context menu, but only if there is no selection

This commit is contained in:
Axel Kohlmeyer
2023-10-09 22:24:22 -04:00
parent a4eaf1e6bd
commit b24e1e10a0
2 changed files with 4 additions and 2 deletions

View File

@ -668,7 +668,9 @@ void CodeEditor::lineNumberAreaPaintEvent(QPaintEvent *event)
void CodeEditor::contextMenuEvent(QContextMenuEvent *event)
{
// reposition the cursor here?
// reposition the cursor here, but only if there is no active selection
if (!textCursor().hasSelection()) setTextCursor(cursorForPosition(event->pos()));
QString page, help;
find_help(page, help);