mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-14 01:56:36 +08:00
Issue #202: show read-only state in text editor via background color and as text in status bar
This commit is contained in:
@ -160,6 +160,8 @@ begin
|
|||||||
MaxLen := FormatNumber(FMaxLength);
|
MaxLen := FormatNumber(FMaxLength);
|
||||||
CursorPos := FormatNumber(MemoText.CaretY) + ':' + FormatNumber(MemoText.CaretX);
|
CursorPos := FormatNumber(MemoText.CaretY) + ':' + FormatNumber(MemoText.CaretX);
|
||||||
lblTextLength.Caption := f_('%s characters (max: %s), %s lines, cursor at %s', [FormatNumber(MemoText.GetTextLen), MaxLen, FormatNumber(MemoText.Lines.Count), CursorPos]);
|
lblTextLength.Caption := f_('%s characters (max: %s), %s lines, cursor at %s', [FormatNumber(MemoText.GetTextLen), MaxLen, FormatNumber(MemoText.Lines.Count), CursorPos]);
|
||||||
|
if MemoText.ReadOnly then
|
||||||
|
lblTextLength.Caption := lblTextLength.Caption + ', read-only';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -258,6 +260,11 @@ begin
|
|||||||
AppSettings.SessionPath := MainForm.GetRegKeyTable;
|
AppSettings.SessionPath := MainForm.GetRegKeyTable;
|
||||||
HighlighterName := AppSettings.ReadString(asMemoEditorHighlighter, FTableColumn.Name, HighlighterName);
|
HighlighterName := AppSettings.ReadString(asMemoEditorHighlighter, FTableColumn.Name, HighlighterName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
if MemoText.ReadOnly then begin
|
||||||
|
MemoText.Color := clBtnFace;
|
||||||
|
end;
|
||||||
|
|
||||||
comboHighlighter.ItemIndex := comboHighlighter.Items.IndexOf(HighlighterName);
|
comboHighlighter.ItemIndex := comboHighlighter.Items.IndexOf(HighlighterName);
|
||||||
comboHighlighter.OnSelect(comboHighlighter);
|
comboHighlighter.OnSelect(comboHighlighter);
|
||||||
// Trigger change event, which is not fired when text is empty. See #132.
|
// Trigger change event, which is not fired when text is empty. See #132.
|
||||||
|
Reference in New Issue
Block a user