mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +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);
|
||||
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]);
|
||||
if MemoText.ReadOnly then
|
||||
lblTextLength.Caption := lblTextLength.Caption + ', read-only';
|
||||
end;
|
||||
|
||||
|
||||
@ -258,6 +260,11 @@ begin
|
||||
AppSettings.SessionPath := MainForm.GetRegKeyTable;
|
||||
HighlighterName := AppSettings.ReadString(asMemoEditorHighlighter, FTableColumn.Name, HighlighterName);
|
||||
end;
|
||||
|
||||
if MemoText.ReadOnly then begin
|
||||
MemoText.Color := clBtnFace;
|
||||
end;
|
||||
|
||||
comboHighlighter.ItemIndex := comboHighlighter.Items.IndexOf(HighlighterName);
|
||||
comboHighlighter.OnSelect(comboHighlighter);
|
||||
// Trigger change event, which is not fired when text is empty. See #132.
|
||||
|
Reference in New Issue
Block a user