mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-20 02:50:46 -06:00
Skip whitespace at the beginning of a failing query for the indication
For the error indicators and scrolling to the failing query, all the whitespace present at the starting end of the query is skipped. Otherwise the point indicated to the user could be very far to the actual query. See issue #2073
This commit is contained in:
@@ -1087,6 +1087,9 @@ void MainWindow::executeQuery()
|
||||
// Note that execute_from_index uses character positions and not byte positions, so text().length() must be used.
|
||||
if (editor->text(execute_from_line).length() == execute_from_index+1) {
|
||||
execute_from_line++;
|
||||
// The next lines could be empty, so skip all of them too.
|
||||
while(editor->text(execute_from_line).trimmed().isEmpty())
|
||||
execute_from_line++;
|
||||
execute_from_index = 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user