From fda777f843ff97894c492132e2ded77cc8542b29 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Wed, 19 Jan 2011 21:04:04 +0000 Subject: [PATCH] Do not go to start of query if error message did not contain a valid character position. Slightly wrong in r3570. --- source/main.pas | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/source/main.pas b/source/main.pas index 1ee45aa1..bbe2e0fb 100644 --- a/source/main.pas +++ b/source/main.pas @@ -2158,10 +2158,9 @@ var ErrorPos := Pos(rx.Match[1], Copy(QueryTab.Memo.Text, SelStart, SIZE_KB)); if ErrorPos > 0 then Inc(SelStart, ErrorPos-1); + QueryTab.Memo.SelLength := 0; + QueryTab.Memo.SelStart := SelStart; end; - - QueryTab.Memo.SelLength := 0; - QueryTab.Memo.SelStart := SelStart; end; begin