From ad3709529c6bee02f7b01b4aa53605c96d2b80c3 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Sun, 21 Jan 2024 16:10:23 +0100 Subject: [PATCH] After reformatting SQL code, unify new lines to Windows line feeds, so the selection's end in SynMemo is correct --- source/reformatter.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/reformatter.pas b/source/reformatter.pas index b5603d9d..aa9ce09d 100644 --- a/source/reformatter.pas +++ b/source/reformatter.pas @@ -63,6 +63,8 @@ begin FOutputCode := FormatSqlOnlineSqlformatOrg(FInputCode); end; end; + // Unify line breaks, so selection end will be correct: + FOutputCode := fixNewlines(FOutputCode); TimeElapsed := GetTickCount64 - StartTime; MainForm.LogSQL(f_('Code reformatted in %s, using formatter %s', [FormatTimeNumber(TimeElapsed/1000, True, 3), '#'+grpReformatter.ItemIndex.ToString])); except