• Login
Community
  • Login

When changing encodings . . .

Scheduled Pinned Locked Moved General Discussion
7 Posts 3 Posters 959 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.
  • B
    Brigham Narins
    last edited by Jun 11, 2019, 8:05 PM

    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?

    M 1 Reply Last reply Jun 11, 2019, 9:34 PM Reply Quote 0
    • M
      Meta Chuh moderator @Brigham Narins
      last edited by Jun 11, 2019, 9:34 PM

      @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
      • B
        Brigham Narins
        last edited by Jun 12, 2019, 4:31 PM

        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?

        A M 2 Replies Last reply Jun 12, 2019, 5:42 PM Reply Quote 3
        • A
          Alan Kilborn @Brigham Narins
          last edited by Jun 12, 2019, 5:42 PM

          @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? :)

          B 1 Reply Last reply Jun 12, 2019, 6:15 PM Reply Quote 1
          • M
            Meta Chuh moderator @Brigham Narins
            last edited by Jun 12, 2019, 6:05 PM

            @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.

            B 1 Reply Last reply Jun 12, 2019, 6:19 PM Reply Quote 3
            • B
              Brigham Narins @Alan Kilborn
              last edited by Jun 12, 2019, 6:15 PM

              @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
              • B
                Brigham Narins @Meta Chuh
                last edited by Jun 12, 2019, 6:19 PM

                @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
                6 out of 7
                • First post
                  6/7
                  Last post
                The Community of users of the Notepad++ text editor.
                Powered by NodeBB | Contributors