From a1672f718744dbdd1776311ac437e7802ceade3d Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Wed, 3 Jun 2015 14:40:47 +0200 Subject: [PATCH] fix, editor modified file, invalid content could be paste if new version of the file was an empty file --- src/ce_synmemo.pas | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ce_synmemo.pas b/src/ce_synmemo.pas index 6320fbeb..a9f5079a 100644 --- a/src/ce_synmemo.pas +++ b/src/ce_synmemo.pas @@ -852,9 +852,12 @@ begin str := TStringList.Create; try str.LoadFromFile(fFilename); - DoCopyToClipboard(str.Text); ClearAll; - PasteFromClipboard; + if str.Count > 0 then + begin + DoCopyToClipboard(str.Text); + PasteFromClipboard; + end; fModified := true; finally str.Free;