From 1028e8f99f8d068df71a612a3a83e642b4e417c6 Mon Sep 17 00:00:00 2001 From: martin Date: Sat, 31 Jul 2010 21:53:49 +0000 Subject: [PATCH] IDE/SourceEditor: Improve quick-fold-in-selection entries to fold menu git-svn-id: trunk@26947 - --- ide/sourcesyneditor.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ide/sourcesyneditor.pas b/ide/sourcesyneditor.pas index cd1b6e07fd..5bd978e506 100644 --- a/ide/sourcesyneditor.pas +++ b/ide/sourcesyneditor.pas @@ -488,7 +488,7 @@ begin if TSynEdit(SynEdit).BlockEnd.X = 1 then dec(y2); HasFolds := FoldView.TextIndexToViewPos(y2) - FoldView.TextIndexToViewPos(y1) <> y2 - y1; - debugln(['*** HasFolds=', HasFolds, ' y1=',y1, ' y2=',y2, ' VP1=',FoldView.TextIndexToViewPos(y1), ' VP2=',FoldView.TextIndexToViewPos(y2)]); + //debugln(['*** HasFolds=', HasFolds, ' y1=',y1, ' y2=',y2, ' VP1=',FoldView.TextIndexToViewPos(y1), ' VP2=',FoldView.TextIndexToViewPos(y2)]); HasHideableComments := False; HasFoldableComments := False; @@ -525,7 +525,9 @@ begin end; end; - if HasFolds or HasCollapsedComments or HasFoldableComments or HasHideableComments then + if (HasFolds or HasCollapsedComments or HasFoldableComments or HasHideableComments) and + (APopUp.Items.Count > 0) + then AddPopUpItem(cLineCaption); If HasFolds then