Explorar o código

ADD: Feature [0002653] "Selected text only" enable if text highlighted (#148)

jack2m %!s(int64=4) %!d(string=hai) anos
pai
achega
a48c727276
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      src/feditor.pas

+ 3 - 0
src/feditor.pas

@@ -833,6 +833,9 @@ begin
     SearchCaseSensitive := bSearchCaseSensitive;
     SearchFromCursor := bSearchFromCaret;
     SearchInSelectionOnly := bSearchSelectionOnly;
+    if Editor.SelAvail and not (Editor.BlockBegin.Y = Editor.BlockEnd.Y)
+    then
+      SearchInSelectionOnly := True;
     SearchRegExp := bSearchRegExp;
     // start with last search text
     SearchText := sSearchText;