Community
    • 登入

    'Replace All, In Sel text only' with multiple selections

    已排程 已置頂 已鎖定 已移動 Help wanted · · · – – – · · ·
    5 貼文 3 Posters 2.3k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Alan KilbornA
      Alan Kilborn
      最後由 編輯

      If I mark 3 selections, left-to-right within all 3:

      • Select with mouse the first selection close to the top of the file
      • Select second selection closer to the end of the file (by holding down control while mouse selecting)
      • Select third selection closer to the end of the file (by holding down control while mouse selecting)

      I can see the text I want to replace existing within all 3 selected regions.

      I invoke the Replace dialog, and tick the “In Sel text only” checkbox. All other checkboxes unticked. Literal search in the downward direction.

      Pressing Replace All button only results in my replace being done in the third selection–shouldn’t it be done in ALL 3 selections?

      What am I not understanding about this feature?

      Claudia FrankC Scott SumnerS 2 條回覆 最後回覆 回覆 引用 0
      • Claudia FrankC
        Claudia Frank @Alan Kilborn
        最後由 編輯

        @Alan-Kilborn

        Hmm, I do have the same understanding,
        unfortunately this function doesn’t work under wine for me at all.
        Under wine, it simply ignores the selection at all. Sorry for not being helpful.

        Cheers
        Claudia

        1 條回覆 最後回覆 回覆 引用 0
        • Scott SumnerS
          Scott Sumner @Alan Kilborn
          最後由 編輯

          @Alan-Kilborn

          Code can do it correctly. :-D

          See my posting in this thread: https://notepad-plus-plus.org/community/topic/13701/python-script-to-replace-on-selection

          Claudia FrankC 1 條回覆 最後回覆 回覆 引用 0
          • Claudia FrankC
            Claudia Frank @Scott Sumner
            最後由 編輯

            @Scott-Sumner

            :-) actually, this is how I do it as well ;-)

            Cheers
            Claudia

            1 條回覆 最後回覆 回覆 引用 0
            • Scott SumnerS
              Scott Sumner
              最後由 編輯

              Earlier I linked to a posting by me in another thread.

              I should have linked to a posting by me in yet another thread: https://notepad-plus-plus.org/community/topic/77/blank-trim-operations-on-a-text-selection-only

              :-D

              I guess the answer to the OP’s question is that this (a selection-based action acting only upon the single, most recently made selection [when there are multiple selections active]) has been known behavior for a long time.

              1 條回覆 最後回覆 回覆 引用 0
              • 第一個貼文
                最後的貼文
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors