From 5c79f6ddf9e8db872863f748cec19463560f4550 Mon Sep 17 00:00:00 2001 From: Ansgar Becker Date: Thu, 13 Dec 2018 06:53:56 +0100 Subject: [PATCH] Switch X and Y coordinates of cursor position label in text editor, like it's in the status bar. And decrease timer interval for updating label. --- source/texteditor.dfm | 2 +- source/texteditor.pas | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/texteditor.dfm b/source/texteditor.dfm index 745731a7..7f590f0b 100644 --- a/source/texteditor.dfm +++ b/source/texteditor.dfm @@ -177,7 +177,7 @@ object frmTextEditor: TfrmTextEditor end end object TimerMemoChange: TTimer - Interval = 500 + Interval = 200 OnTimer = TimerMemoChangeTimer Left = 120 Top = 16 diff --git a/source/texteditor.pas b/source/texteditor.pas index ceeb92f3..17d59be5 100644 --- a/source/texteditor.pas +++ b/source/texteditor.pas @@ -134,7 +134,7 @@ begin Lines := 0 else Lines := CountLineBreaks(FmemoText.Text) + 1; - CursorPos := FormatNumber(FmemoText.CaretPos.X+1) + ' : ' + FormatNumber(FmemoText.CaretPos.Y+1); + CursorPos := FormatNumber(FmemoText.CaretPos.Y+1) + ' : ' + FormatNumber(FmemoText.CaretPos.X+1); lblTextLength.Caption := f_('%s characters (max: %s), %s lines, cursor at %s', [FormatNumber(TextLen), MaxLen, FormatNumber(Lines), CursorPos]); end;