Community
    • Login

    Sorting broken with v7.8.9 update?

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    15 Posts 4 Posters 672 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.
    • Alan KilbornA
      Alan Kilborn @Michael Vincent
      last edited by Alan Kilborn

      @Michael-Vincent

      Just to clarify, the previous behavior “appears to be a bug” or the new behavior is?

      Sorry, that was a bit unclear, but I meant it tied to what appeared closest to the last statement I made.

      I’ll restate my last line from earlier:

      …which, I have not considered before, but now indeed appears to be a bug in 7.8.8 and earlier (not what the user intended to include in the sort)

      It’s kind of a dichotomy:

      You want to sort only selected lines, but that darned skinny-edged caret can be on a separate line in column 1. Now, is that caret part of the selection, helping to define the lines I want to sort, or isn’t it?

      There were workarounds to avoid it:

      • Select from lower part of file, towards upper part to define your line range – no caret-on-line-by-itself issue that way

      • Select only a portion of the final line at the bottom – even just having the first character in column 1 selected works great – but this doesn’t work for the line-number-margin draggers of the world

      Like you, I prefer the 7.8.9 (and presumably greater) behavior.

      Michael VincentM 1 Reply Last reply Reply Quote 3
      • Michael VincentM
        Michael Vincent @Alan Kilborn
        last edited by

        @Alan-Kilborn said in Sorting broken with v7.8.9 update?:

        but now indeed appears to be a bug in 7.8.8 and earlier
        […]
        Like you, I prefer the 7.8.9 (and presumably greater) behavior.

        We are in violent agreement! :-)

        Alan KilbornA 1 Reply Last reply Reply Quote 2
        • Alan KilbornA
          Alan Kilborn @Michael Vincent
          last edited by

          @Michael-Vincent

          Here’s a situation that is still bad IMO even with 7.8.9:

          Start with:

          999315c5-3a36-45a1-98cf-a1dd59a0563a-image.png

          Sort ascending without specifying a selection to obtain:

          7fe17303-07cc-4bda-85fc-9de38ae25fa0-image.png

          I start (in my mind) with 4 lines of data.
          Just because I believe line 4 isn’t complete without a line-ending, doesn’t (again, for me) mean that I have 5 lines, and that five lines should be sorted.

          I think this would be a much better and more expected result:

          309a6c1d-4286-4979-aece-f1d65bdb19ed-image.png

          Michael VincentM 2 Replies Last reply Reply Quote 1
          • Michael VincentM
            Michael Vincent @Alan Kilborn
            last edited by

            @Alan-Kilborn said in Sorting broken with v7.8.9 update?:

            I think this would be a much better and more expected result:

            Yes, I agree.

            1 Reply Last reply Reply Quote 2
            • Michael VincentM
              Michael Vincent @Alan Kilborn
              last edited by

              @Alan-Kilborn said in Sorting broken with v7.8.9 update?:

              I think this would be a much better and more expected result:

              If I understand the pull request properly, there seems to be an available PR to fix this - just not yet integrated.

              Cheers.

              Alan KilbornA 1 Reply Last reply Reply Quote 3
              • Alan KilbornA
                Alan Kilborn @Michael Vincent
                last edited by

                @Michael-Vincent said in Sorting broken with v7.8.9 update?:

                seems to be an available PR to fix this

                Oh nice, I must have missed seeing that.
                Hope it is in next version.
                Maybe they are saving up a lot of changes as the odometer rolls over to 7.9

                Michael VincentM 1 Reply Last reply Reply Quote 0
                • Michael VincentM
                  Michael Vincent @Alan Kilborn
                  last edited by

                  @Alan-Kilborn said in Sorting broken with v7.8.9 update?:

                  Maybe they are saving up a lot of changes as the odometer rolls over to 7.9

                  Here’s hoping they add my Function List feature update - please give it a thumbs up if you agree.

                  Cheers.

                  1 Reply Last reply Reply Quote 1
                  • Doc JohnD
                    Doc John @PeterJones
                    last edited by

                    @PeterJones
                    Debug info:
                    Notepad++ v7.8.9 (64-bit)
                    Build time : Jul 15 2020 - 20:31:49
                    Path : C:\Program Files\Notepad++\notepad++.exe
                    Admin mode : ON
                    Local Conf mode : OFF
                    OS Name : Windows 10 Pro (64-bit)
                    OS Version : 1909
                    OS Build : 18363.815
                    Current ANSI codepage : 1252
                    Plugins : CustomLineNumbers.dll ExtSettings.dll mimeTools.dll NppConverter.dll NppExport.dll RunMe.dll _CustomizeToolbar.dll

                    As for examples, I haven’t been able to sort any of dozens of files, including lists of only numbers, so take your pick.
                    You’ll notice I have very few plugins installed, to speed up load times. Is there a plugin needed for the sort function
                    to operate properly?

                    PeterJonesP Alan KilbornA 2 Replies Last reply Reply Quote 0
                    • PeterJonesP
                      PeterJones @Doc John
                      last edited by

                      @Doc-John said in Sorting broken with v7.8.9 update?:

                      Is there a plugin needed for the sort function
                      to operate properly?

                      No. Sorting is built into the main notepad++.exe.

                      I just downloaded a fresh npp.7.8.9.bin.x64.zip, unzipped to a writeable location on my drive, and ran from there. I typed the four lines

                      one
                      two
                      three
                      four
                      

                      Then ran Edit > Line Operations > Sort Lines Lexicographically Ascending, and the file now contains:

                      four
                      one
                      three
                      two
                      

                      It sorts exactly as I would expect it to. Here is a screenshot:
                      5e98ce33-5422-487f-8bb5-35344d9b6710-image.png

                      I haven’t been able to sort any of dozens of files, including lists of only numbers, so take your pick.

                      I just picked a file with four simple words, and it sorted just fine.

                      I’ll try another file:

                      3
                      14
                      15
                      9
                      27
                      65
                      

                      if I sort lexicographically ascending, it shows

                      14
                      15
                      27
                      3
                      65
                      9
                      

                      which is what I expect, because “lexicographically” means sorted by character in ASCII/codepoint order, not sorted numerically. So a line starting with 14 comes before 15 comes before 27 comes before 3, because the character 1 comes before the character 2 comes before the character 3.
                      If, instead, I Sort Lines as Integers Ascending, I get

                      3
                      9
                      14
                      15
                      27
                      65
                      

                      because the integer 3 is less than the integer 9 is less than the integer 14, and so on.

                      It works exactly as I would expect with the default version of Notepad++, no extra plugins installed.

                      If this isn’t true for you, you will need to show us the data and the exact steps that don’t work for you. Because it works for me with the data shown; and everyone else who has commented, directly or tangentially, in this discussion has shown that sort is fundamentally working (even if they have quibbles with the treatment of the blank line at the end of the selection).

                      1 Reply Last reply Reply Quote 1
                      • Alan KilbornA
                        Alan Kilborn @Doc John
                        last edited by

                        @Doc-John said in Sorting broken with v7.8.9 update?:

                        As for examples, I haven’t been able to sort any of dozens of files, including lists of only numbers, so take your pick.

                        This is an idiotic statement.
                        YOU are the one that needs help.
                        You’d think you’d bend over backwards to provide even the simplest example and show how it doesn’t work for you.
                        Sheesh.

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