mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
fix AutoSelectQuery.
Автовыбор запроса выбирал все запросы если курсор находиться в конце документа. Теперь выбирает пустой запрос.
This commit is contained in:
parent
2989801a84
commit
613c392361
1 changed files with 6 additions and 3 deletions
|
|
@ -1498,7 +1498,7 @@ std::pair<int,int> ctlSQLBox::SelectQuery(int startposition)
|
|||
int st = GetStyleAt(pos - 1);
|
||||
int endPos = GetLength();
|
||||
int pend=endPos;
|
||||
int pstart=0;
|
||||
int pstart=pos;
|
||||
|
||||
if (ch == ';') {
|
||||
pend=pos;
|
||||
|
|
@ -1521,7 +1521,9 @@ std::pair<int,int> ctlSQLBox::SelectQuery(int startposition)
|
|||
int i=IsDBCSLeadByte(ch)? 2 : 1;
|
||||
#else
|
||||
int i=1;
|
||||
if (ch>255) i=2;
|
||||
if (ch>255*255) i=3;
|
||||
else if (ch>255) i=2;
|
||||
|
||||
#endif
|
||||
pos=pos+i;
|
||||
}
|
||||
|
|
@ -1547,7 +1549,8 @@ std::pair<int,int> ctlSQLBox::SelectQuery(int startposition)
|
|||
int i=IsDBCSLeadByte(ch)? 2 : 1;
|
||||
#else
|
||||
int i=1;
|
||||
if (ch>255) i=2;
|
||||
if (ch>255*255) i=3;
|
||||
else if (ch>255) i=2;
|
||||
#endif
|
||||
pos=pos-i;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue