File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1189,7 +1189,7 @@ function TInplaceEditorLink.BeginEdit: Boolean;
11891189 if Result then begin
11901190 FButton.Visible := ButtonVisible;
11911191 SetBounds(Rect(0 , 0 , 0 , 0 ));
1192- if (Length(FEdit.Text) > SIZE_KB ) or (ScanLineBreaks(FEdit.Text) <> lbsNone) then
1192+ if (Length(FEdit.Text) >= GRIDMAXDATA ) or (ScanLineBreaks(FEdit.Text) <> lbsNone) then
11931193 ButtonClick(FTree)
11941194 else begin
11951195 FPanel.Show;
Original file line number Diff line number Diff line change @@ -142,11 +142,15 @@ procedure TfrmTextEditor.SetText(text: String);
142142 end ;
143143 if Assigned(Detected) then
144144 SelectLineBreaks(Detected);
145- if (Length(text) > SIZE_MB ) then begin
146- MainForm.LogSQL(_(' Auto-disabling wordwrap for large text' ));
145+ if (Length(text) > SIZE_KB* 10 ) then begin
146+ MainForm.LogSQL(_(' Auto-disabling wordwrap and syntax highlighter for large text' ));
147147 btnWrap.Enabled := False;
148+ comboHighlighter.Enabled := False;
149+ btnCustomizeHighlighter.Enabled := False;
148150 end else begin
149151 btnWrap.Enabled := True;
152+ comboHighlighter.Enabled := True;
153+ btnCustomizeHighlighter.Enabled := True;
150154 end ;
151155
152156 MemoText.Text := text;
@@ -380,6 +384,8 @@ procedure TfrmTextEditor.comboHighlighterSelect(Sender: TObject);
380384 SelStart, SelLength: Integer;
381385begin
382386 // Code highlighter selected
387+ if not comboHighlighter.Enabled then
388+ Exit;
383389 SelStart := MemoText.SelStart;
384390 SelLength := MemoText.SelLength;
385391 MemoText.Highlighter := nil ;
You can’t perform that action at this time.
0 commit comments