fix: can't toggle bookmark when mouse is at end of the line

This commit is contained in:
Roy Qu 2024-05-05 12:59:49 +08:00
parent e6b57b79c0
commit 29e5541477
1 changed files with 2 additions and 2 deletions

View File

@ -5148,7 +5148,8 @@ void MainWindow::onEditorContextMenu(const QPoint& pos)
QSynedit::BufferCoord p;
int line;
if (editor->getPositionOfMouse(p)) {
line=p.line;
if (!editor->getLineOfMouse(line))
line=-1;
if (!switchHeaderSourceTarget(editor).isEmpty()) {
menu.addAction(ui->actionSwitchHeaderSource);
menu.addSeparator();
@ -5194,7 +5195,6 @@ void MainWindow::onEditorContextMenu(const QPoint& pos)
menu.addAction(ui->actionFile_Properties);
} else {
//mouse on gutter
if (!editor->getLineOfMouse(line))
line=-1;
if (canDebug) {