Browse Source

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

jack2m 4 năm trước cách đây
mục cha
commit
a48c727276
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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;