Skip to content

Commit dd76b49

Browse files
committed
0.7.0.9: Fixed statement boundary detection in query editor execute-at-cursor mode that caused the next statement to execute when the cursor was at the very end of the line
1 parent 0e42c09 commit dd76b49

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/sqlite-ce-edit/execute.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,9 @@ void ExecuteQuery(void) {
370370
else if (c == '-' && full[i+1] == '-') inCmt = 1;
371371
else if (c == '/' && full[i+1] == '*') { i++; inCmt = 2; }
372372
else if (c == ';') {
373-
if (i < cursorPos) stmtStart = i + 1;
374-
else if (stmtEnd == fullLen) stmtEnd = i;
373+
/* Cursor after this semicolon = this statement's end was found */
374+
if (i + 1 < cursorPos) stmtStart = i + 1;
375+
else if (stmtEnd == fullLen) stmtEnd = i + 1;
375376
}
376377
}
377378
}

src/sqlite-ce-edit/globals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ BOOL WINAPI GetSaveFileNameW(CE_OPENFILENAME*);
8282
** Version
8383
**============================================================================*/
8484

85-
#define SQLITECEDIT_VERSION L"0.7.0.7"
85+
#define SQLITECEDIT_VERSION L"0.7.0.9"
8686

8787
/*============================================================================
8888
** Menu IDs

0 commit comments

Comments
 (0)