From 1b9c403a72ec0198f439401dd9d1d73f63412ad0 Mon Sep 17 00:00:00 2001 From: lsv Date: Thu, 1 Feb 2024 09:45:19 +0500 Subject: [PATCH] fix autoselect query MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Если в многострочном комментарии встрачался символ ";" то он ошибочно считался окончанием запроса. --- ctl/ctlSQLBox.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ctl/ctlSQLBox.cpp b/ctl/ctlSQLBox.cpp index ec50885..b74be7d 100644 --- a/ctl/ctlSQLBox.cpp +++ b/ctl/ctlSQLBox.cpp @@ -1097,7 +1097,10 @@ long ctlSQLBox::SelectQuery(int startposition) ch = GetCharAt(pos); st = GetStyleAt(pos) & 0x1F; if ((ch == ';') && - st != 2 && st != 6 && st != 7) + st != wxSTC_SQL_COMMENTLINE && + st != wxSTC_SQL_STRING && + st != wxSTC_SQL_CHARACTER && + st!= wxSTC_SQL_COMMENT) { pend=pos; break; @@ -1118,7 +1121,11 @@ long ctlSQLBox::SelectQuery(int startposition) ch = GetCharAt(pos); st = GetStyleAt(pos) & 0x1F; if ((ch == ';') && - st != 2 && st != 6 && st != 7) + st != wxSTC_SQL_COMMENTLINE && + st != wxSTC_SQL_STRING && + st != wxSTC_SQL_CHARACTER && + st != wxSTC_SQL_COMMENT + ) { //pstart=pos+1; break;