Community
    • Login

    Bug Report

    Scheduled Pinned Locked Moved Boycott Notepad++
    8 Posts 3 Posters 201 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LukeL
      Luke
      last edited by

      When I want to replace a certain word or character in a document with another one in the entire document, there is no such function in the editor at all. Well, I know about the word search function, or for example, I want to replace all long dashes with short ones – I’m looking for dashes in the entire document. I get a list with lines where my long dash occurs. If the text is long, there is no function in this window to make line breaks so that you don’t have to scroll through tons of text. There is no such function that replaces all the found long dashes with the text I want to replace, I have to do everything manually EVERY line. Moreover, the first time I double-click on a found symbol, it is in a text editor and it can even be replaced by writing text. Now try to repeat the same thing on the other line you found. When you try to edit, some strange symbols appear, and even in another place of the document. Make a real-time editing feature of the found text and text in a text editor.

      Sorry for the tone, I have a day off today and I’m too lazy to talk.

      Alan KilbornA LukeL 2 Replies Last reply Reply Quote 0
      • Alan KilbornA
        Alan Kilborn @Luke
        last edited by

        @Luke

        Probably you want to check out the Replace command on the Search menu.

        LukeL 1 Reply Last reply Reply Quote 1
        • LukeL
          Luke @Alan Kilborn
          last edited by

          @Alan-Kilborn

          Oh my God, thank you very much!

          1 Reply Last reply Reply Quote 0
          • LukeL
            Luke @Luke
            last edited by

            In order to make it clear what I wrote in the last post, I was unhappy that I couldn’t replace one text with another throughout the document. Moreover, I immediately encountered another problem while using the program. @Alan Kilborn explained the solution to the first problem, and surprisingly and fortunately, the second problem has disappeared today. But just in case, I will leave a message here detailing what happened to me, what I called a bug in the program.

            • I press Ctrl+F and search for, for example, an em dash, and click ‘Find All in Current Document’.
            • I get search results, and in that, I want to edit, but there is no such possibility (it would be great if it were possible).
            • Then I double-click on the found em dash, it gets highlighted in the text editor above, and I can immediately type any text, thus replacing it. But if I do this with another line, then in the text editor window, the input cursor appears in a different place, and when I try to input any text, strange symbols appear.

            CoisesC Alan KilbornA 2 Replies Last reply Reply Quote 0
            • CoisesC
              Coises @Luke
              last edited by Coises

              @Luke said in Bug Report:

              • I press Ctrl+F and search for, for example, an em dash, and click ‘Find All in Current Document’.
              • I get search results, and in that, I want to edit, but there is no such possibility (it would be great if it were possible).
              • Then I double-click on the found em dash, it gets highlighted in the text editor above, and I can immediately type any text, thus replacing it. But if I do this with another line, then in the text editor window, the input cursor appears in a different place, and when I try to input any text, strange symbols appear.

              I can reproduce this.

              First, let me note that if you start from the last occurrence of the found character in the search results and work backward, this won’t happen.

              The search results list doesn’t update when you change the document. Each result “points to” the offset of that result from the beginning of the document. When you change text, you mess up the offsets of everything that follows that text.

              In the case you describe you were almost certainly editing a Unicode file. Regardless of the external file format, Notepad++ handles all Unicode as UTF-8. UTF-8 characters have varying widths; so even if you replaced — with -, one character for one character, it’s not one byte for one byte; an em dash requires three bytes in UTF-8, while a hyphen takes only one byte.

              The “strange characters” — which, in my test, were invalid UTF-8 — are appearing because the found text in the search results list is now “pointing to” the middle of a multi-byte UTF-8 character. It seems reasonable that Notepad++ should test for this and not allow it. (Normally you can’t position the edit point in the middle of a character.)

              Basically, after getting a search results list, once you edit the document, any search results following the point of the edit are potentially invalid. I agree that’s not obvious. It wouldn’t just occur naturally to someone that you have to edit “backwards” if you don’t want to keep redoing the search.

              LukeL 1 Reply Last reply Reply Quote 1
              • Alan KilbornA
                Alan Kilborn @Luke
                last edited by Alan Kilborn

                @Luke said:

                I get search results, and in that, I want to edit, but there is no such possibility

                I think when you say “I want to edit” you really mean “I want the program to be able to replace for me, via the Search results”.

                Because…of course you can “edit” (definition of “edit” is to have a caret at a certain point, and be able to insert characters by typing or remove characters by pressing the Delete or Backspace keys).

                And…I also conclude it because of things you’ve said before.

                But note this: The Search results window is all about “finding”, not “replacing”. It has no replacing capability. I hope that you understand this.

                1 Reply Last reply Reply Quote 0
                • LukeL
                  Luke @Coises
                  last edited by

                  @Alan-Kilborn & @Coises

                  Thank you!

                  1 Reply Last reply Reply Quote 0
                  • Alan KilbornA
                    Alan Kilborn
                    last edited by

                    I made an issue of this bug: https://github.com/notepad-plus-plus/notepad-plus-plus/issues/16879

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post
                    The Community of users of the Notepad++ text editor.
                    Powered by NodeBB | Contributors