Skip to content
Permalink
Browse files

Don't prompt to save an empty query tab. Closes #614.

  • Loading branch information...
ansgarbecker committed Apr 16, 2019
1 parent 85a8355 commit d735d0088c2a933f2fc41ae76576b9b958ee58b2
Showing with 9 additions and 0 deletions.
  1. +9 −0 source/main.pas
@@ -6045,7 +6045,16 @@ procedure TMainForm.SynCompletionProposalExecute(Kind: SynCompletionType;

procedure TMainForm.SynMemoQueryStatusChange(Sender: TObject; Changes:
TSynStatusChanges);
var
Edit: TSynMemo;
begin
// Don't ask for saving empty contents. See issue #614
Edit := Sender as TSynMemo;
if Edit.GetTextLen = 0 then begin
ActiveQueryTab.MemoFilename := '';
ActiveQueryTab.Memo.Modified := False;
end;
// Update various controls
ValidateQueryControls(Sender);
UpdateLineCharPanel;
end;

0 comments on commit d735d00

Please sign in to comment.
You can’t perform that action at this time.