We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8e68ee commit fa48ce1Copy full SHA for fa48ce1
app/markdowneditor.cpp
@@ -476,9 +476,10 @@ QString MarkdownEditor::textUnderCursor() const
476
cursor.clearSelection();
477
478
// move left until we find a space or reach the start of line
479
- do {
+ while(!document->characterAt(cursor.position()-1).isSpace() && !cursor.atBlockStart()) {
480
cursor.movePosition(QTextCursor::Left, QTextCursor::KeepAnchor);
481
- } while(!document->characterAt(cursor.position()-1).isSpace() && !cursor.atBlockStart());
+ }
482
+
483
484
return cursor.selectedText();
485
}
0 commit comments