From 15c9325c0e03e6edb495c304956f76903a5d1943 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sat, 28 Apr 2018 09:03:58 +0200 Subject: [PATCH] fix more runtime error due to fix for #307 + mixed indent dialog could be shown during tab switch, w/o doc visible yet --- cesetup/cesetup.coedit | 2 +- cesetup/version.txt | 2 +- src/ce_synmemo.pas | 11 ++++++----- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cesetup/cesetup.coedit b/cesetup/cesetup.coedit index 92f7e632..6d16cb5c 100644 --- a/cesetup/cesetup.coedit +++ b/cesetup/cesetup.coedit @@ -84,5 +84,5 @@ object CurrentProject: TCENativeProject 'cesetup.d' ) ConfigurationIndex = 2 - version = '3.6.10' + version = '3.6.11' end diff --git a/cesetup/version.txt b/cesetup/version.txt index 6515133f..03183d52 100644 --- a/cesetup/version.txt +++ b/cesetup/version.txt @@ -1 +1 @@ -v3.6.10 +v3.6.11 diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index eca436a5..11a46051 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -1137,8 +1137,9 @@ end; procedure TCESynMemo.handleModalBeginning(sender: TObject); begin // AV can happens in TCustomSynEdit.UpdateCursor - if assigned(FTextArea) and (eoAutoHideCursor in Options2) then - MouseMove([], 0, 0); + if (self <> nil) and (Pcardinal(@FTextArea)^ <> $f0f0f0f0) and (Pcardinal(@FTextArea)^ <> $0f0f0f0f) + and assigned(FTextArea) and (eoAutoHideCursor in Options2) then + MouseMove([], 0, 0); end; procedure TCESynMemo.setFocus; @@ -1146,7 +1147,6 @@ begin inherited; highlightCurrentIdentifier; subjDocFocused(TCEMultiDocSubject(fMultiDocSubject), self); - tryToPatchMixedIndentation; end; procedure TCESynMemo.showPage; @@ -1162,6 +1162,7 @@ begin subjDocFocused(TCEMultiDocSubject(fMultiDocSubject), self); fFocusForInput := true; fScrollMemo.Visible:=false; + tryToPatchMixedIndentation; end; procedure TCESynMemo.DoExit; @@ -3588,8 +3589,8 @@ begin Options:= Options + [eoTabsToSpaces]; imMixed: if (isDSource or alwaysAdvancedFeatures) and - (dlgYesNo('Mixed indentation style detected, ' + - 'do you wish to convert to a single mode ?') = mrYes) then + (dlgYesNo('Mixed indentation style detected in, "' + fFilename + + '", do you wish to convert to a single mode ?') = mrYes) then with TMixedIndentationDialog.construct() do try case ShowModal of