Community
    • Login

    When changing encodings . . .

    Scheduled Pinned Locked Moved General Discussion
    7 Posts 3 Posters 952 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.
    • Brigham NarinsB
      Brigham Narins
      last edited by

      When I change the encoding of the file I’m working on–usually from UTF-8 to ANSI and back again–the view will jump to a portion of the file near the end (not all the way). The cursor won’t move, so it’s easy to get back where I was, but the jump is odd and inconvenient. Is this a known issue and can it be changed?

      Meta ChuhM 1 Reply Last reply Reply Quote 0
      • Meta ChuhM
        Meta Chuh moderator @Brigham Narins
        last edited by

        @Brigham-Narins

        i can’t reproduce an automatic scroll to near the end of that file, when changing encoding from utf-8 to ansi and back.

        please test the following, to verify, if a clean notepad++ (without any plugins that could cause this) would work on your system.

        • download the notepad++ 7.7 portable version from >>> here <<<.
          (the portable version does not require any installation and runs completely independent and isolated from your installed version. all custom settings, as well as any stuff you might want to try at the portable version, will not modify your installed version)

        • extract npp.7.7.bin.zip to your desktop.

        • important note: make sure to close all instances of notepad++ that might be running, before starting the portable version at the next step, to make sure you are using this portable version.

        • open the extracted npp.7.7.bin folder and start this portable version by double-clicking on notepad++.exe inside this folder.
          (note: notepad++.exe will just be seen as notepad++, if you have enabled to hide all known file extensions at your explorer settings)

        • open up any larger file and put the cursor anywhere, then change the file format and back again.
          the view should stay where it is.

        best regards.

        1 Reply Last reply Reply Quote 2
        • Brigham NarinsB
          Brigham Narins
          last edited by

          Thanks for the suggestion, @Meta-Chuh. I did as you instructed, and I get the exact same behavior. However, I discovered that switching encodings causes the jumping I described only when word wrap is on. What do you think about that?

          Alan KilbornA Meta ChuhM 2 Replies Last reply Reply Quote 3
          • Alan KilbornA
            Alan Kilborn @Brigham Narins
            last edited by

            @Brigham-Narins said:

            only when word wrap is on. What do you think about that?

            We’d say, oh, you use word-wrap and that’s the ONLY oddity you’ve noticed with it? :)

            Brigham NarinsB 1 Reply Last reply Reply Quote 1
            • Meta ChuhM
              Meta Chuh moderator @Brigham Narins
              last edited by

              @Brigham-Narins

              yes, you are absolutely correct.

              i retested this with files with longer lines, and can reproduce this now, if word wrap is enabled, but not always.
              and it seems to depend on where the cursor is placed within the document, as well as the position where it scrolls to, seems to depend on the current size of the editor window.

              i’ve also tested the same on the scintilla demo editor scite 4.1.5 and it behaves the same, when using word wrap, a similar viewing size and the same document.

              i didn’t have time though, to look if anyone has already posted this behaviour at the scintilla feature request or issue tracker, and i don’t know if this is something that would be worked on if filed.

              many thanks and best regards.

              Brigham NarinsB 1 Reply Last reply Reply Quote 3
              • Brigham NarinsB
                Brigham Narins @Alan Kilborn
                last edited by

                @Alan-Kilborn said:

                @Brigham-Narins said:

                only when word wrap is on. What do you think about that?

                We’d say, oh, you use word-wrap and that’s the ONLY oddity you’ve noticed with it? :)

                I’d say yeah, this is the only problem word wrap causes me. I didn’t realize it was a fraught feature. I have to wrap the lines, though, I’m dealing with a lot of text: encyclopedia entries in XML structure.

                1 Reply Last reply Reply Quote 2
                • Brigham NarinsB
                  Brigham Narins @Meta Chuh
                  last edited by

                  @Meta-Chuh said:

                  @Brigham-Narins

                  yes, you are absolutely correct.

                  i retested this with files with longer lines, and can reproduce this now, if word wrap is enabled, but not always.
                  and it seems to depend on where the cursor is placed within the document, as well as the position where it scrolls to, seems to depend on the current size of the editor window.

                  Exactly

                  i’ve also tested the same on the scintilla demo editor scite 4.1.5 and it behaves the same, when using word wrap, a similar viewing size and the same document.

                  Interesting

                  i didn’t have time though, to look if anyone has already posted this behaviour at the scintilla feature request or issue tracker, and i don’t know if this is something that would be worked on if filed.

                  many thanks and best regards.

                  Well, thanks for your help. I really appreciate it.

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