diff --git a/Release/pgAdmin3.exe b/Release/pgAdmin3.exe index f59f030..fcf82b3 100644 Binary files a/Release/pgAdmin3.exe and b/Release/pgAdmin3.exe differ diff --git a/ctl/ctlSQLBox.cpp b/ctl/ctlSQLBox.cpp index d7b9f13..30f6c2c 100644 --- a/ctl/ctlSQLBox.cpp +++ b/ctl/ctlSQLBox.cpp @@ -998,6 +998,7 @@ void ctlSQLBox::OnPositionStc(wxStyledTextEvent &event) int startsql=0; // Roll back through the doc and highlight any unmatched braces int tmp=pos; + list_table.Clear(); while ((pos--) >= 0) { ch = GetCharAt(pos); @@ -1012,7 +1013,8 @@ void ctlSQLBox::OnPositionStc(wxStyledTextEvent &event) if (match == wxSTC_INVALID_POSITION) { BraceBadLight(pos); - break; + event.Skip(); + return; } else { @@ -1046,9 +1048,10 @@ void ctlSQLBox::OnPositionStc(wxStyledTextEvent &event) st != 1 &&st != 2 && st != 6 && st != 7) { match = BraceMatch(pos); - if (match == wxSTC_INVALID_POSITION) + if (match == wxSTC_INVALID_POSITION || (match>=pos)) { - break; + event.Skip(); + return; } else { pos=match-1; @@ -1059,7 +1062,7 @@ void ctlSQLBox::OnPositionStc(wxStyledTextEvent &event) int endtext= GetLength(); bool isfrom=false; pos=startsql; - list_table.Clear(); + ident.Clear(); while (pospos) pos=match; ident.Clear(); } } @@ -1175,7 +1184,7 @@ void ctlSQLBox::OnAutoComplete(wxCommandEvent &rev) token=token.AfterLast('.'); found=token.CmpNoCase(alias)==0; if (tokenizer.GetLastDelimiter()==' '&&found) { - table=token; + if (p==1) table=prev; else table=token; break; } if ((tokenizer.GetLastDelimiter()==',')&&found) { diff --git a/frm/frmQuery.cpp b/frm/frmQuery.cpp index 87e42ee..873b64d 100644 --- a/frm/frmQuery.cpp +++ b/frm/frmQuery.cpp @@ -747,7 +747,7 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w pgSet *functions; wxString def_f; wxString def_name; - functions = conn->ExecuteSet(wxT("select pg_get_function_arguments(oid) def,proname,pronargs nargs from pg_proc where pronargs<>0 order by proname,pronargs")); + functions = conn->ExecuteSet(wxT("select pg_get_function_arguments(oid) def,proname,pronargs nargs from pg_proc where pronargs>=0 order by proname,pronargs")); if (functions) { //name_func.Init(true);