Community
    • Login

    Bug report: Indented and aligned carriage return not working

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    13 Posts 5 Posters 1.0k 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 @MattexD
      last edited by

      @MattexD

      This sounds to me like a long-known issue that I could take some time and go over to my copy of Notepad++ and try to remember the exact circumstances and then reproduce the problem and then come back here and type all about it…

      But you’ve already done that, you just don’t show (e.g. screenshot) the example that you are currently looking at on your screen. So why don’t you do that, and then others will have a better idea on how to comment on it.

      Overall I think what will come out of this is “that’s how Scintilla does it” (Scintilla being an external project editing component that Notepad++ integrates), and it would have to be reported to the folks that manage that project, to see if they’d make a change to it.

      But, first things first… more information…

      1 Reply Last reply Reply Quote 1
      • MattexDM
        MattexD @Terry R
        last edited by

        @Terry-R Ohh sorry I’m new here I’ll be more careful next time.
        Here is the information:
        Notepad++ v8.6 (64-bit)
        Build time: Nov 23 2023 - 16:58:44
        Path : C:\Program Files\Notepad++\notepad++.exe
        Command Line:
        Admin mode : OFF
        Local Conf mode : OFF
        Cloud Config : OFF
        OS Name : Windows 11 Home (64-bit)
        OS Version: 23H2
        OS Build: 22631.2715
        Current ANSI code page: 1252
        Plugins:
        mimeTools (2.9)
        NppConverter (4.5)
        NppExport (0.4)

        1 Reply Last reply Reply Quote 1
        • mkupperM
          mkupper @MattexD
          last edited by

          @MattexD said in Bug report: Indented and aligned carriage return not working:

          I wanted to report a problem I encountered with word wrapping that doesn’t work as expected if aligned and indented word wrapping is set in the settings. In both cases the carriage return is made at the beginning of each line.

          You need to provide far more information such as the steps you used to reproduce, screen shots. Please keep in mind that people can’t read your mind and so don’t know what you “expected.” Notepad++ may well be working exactly as designed and does what its average users expect.

          That said, there are quirks with both the Enter and Tab keys where indentation chosen by Notepad++ sometimes surprises me. For me, if I have a tab-indented paragraph:

          	Lorem ipsum dolor sit amet, consectetur adipiscing elit,
          	sed do eiusmod tempor incididunt ut labore et dolore 
          	magna aliqua.▯
          

          The cursor is on the ▯. I press Enter and see that Notepad++ keeps the indentation as expected:

          	Lorem ipsum dolor sit amet, consectetur adipiscing elit,
          	sed do eiusmod tempor incididunt ut labore et dolore 
          	magna aliqua.
          	▯
          

          I go away, work on other files, and later am back in this area though this time I have the cursor at the beginning of the line.

          	Lorem ipsum dolor sit amet, consectetur adipiscing elit,
          	sed do eiusmod tempor incididunt ut labore et dolore 
          	magna aliqua.
          ▯	
          

          I don’t see that there is a tab after the cursor, I press Tab to indent and am surprised by the extra indent.

          	Lorem ipsum dolor sit amet, consectetur adipiscing elit,
          	sed do eiusmod tempor incididunt ut labore et dolore 
          	magna aliqua.
          		▯
          

          Notepad++ worked correctly but did not read my mind… :-)

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

            Perhaps THIS ISSUE is relevant? It’s all a guessing game until OP provides more information.

            1 Reply Last reply Reply Quote 3
            • MattexDM
              MattexD @mkupper
              last edited by MattexD

              @mkupper I wanted to make a small film but I’ll settle for.
              The example is on the second struct

              Screenshot 2023-11-30 094224.png Screenshot 2023-11-30 094240.png

              as you can see, despite it being an image, when wrapping the indicator it returns right to the beginning of the line and not just below the instruction

              Alan KilbornA PeterJonesP 2 Replies Last reply Reply Quote 1
              • Alan KilbornA
                Alan Kilborn @MattexD
                last edited by

                @MattexD said in Bug report: Indented and aligned carriage return not working:

                when wrapping the indicator it returns right to the beginning of the line and not just below the instruction

                If I try a similar thing with a C language document, it doesn’t do that; my caret after Enter is indented one tab width.

                1 Reply Last reply Reply Quote 0
                • PeterJonesP
                  PeterJones @MattexD
                  last edited by PeterJones

                  @MattexD said in Bug report: Indented and aligned carriage return not working:

                  as you can see, despite it being an image, when wrapping the indicator it returns right to the beginning of the line and not just below the instruction

                  The Settings > Preferences > Editing > Line Wrap settings you are showing in your screenshots are not the feature you are describing. Those settings affect the visual display of long lines when you have View > Word Wrap enabled.

                  But you have implied that what you really want is for a line to automatically indent when you hit ENTER after a line that was already indented – like when you hit ENTER after line 62 to create line 63 in your second screenshot. If I have interpreted you correctly, then what you want is the Auto-Indent feature, which is found at Settings > Preferences > Auto-Completion > ☐ Auto-indent. If that option is checkmarked, the Notepad++ will automatically indent when you hit ENTER

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

                    BTW, I made my previous comment based on Notepad++ default setup, which is Auto Indent checkmarked.

                    If users turn this off at some point in their usage of Notepad++, do we really have to help them figure out that they should turn it back on?

                    1 Reply Last reply Reply Quote 1
                    • MattexDM
                      MattexD @PeterJones
                      last edited by MattexD

                      @PeterJones I tried to check both things but it still doesn’t work correctly, in fact it doesn’t respect the correct indentation

                      PeterJonesP 1 Reply Last reply Reply Quote 0
                      • PeterJonesP
                        PeterJones @MattexD
                        last edited by PeterJones

                        @MattexD ,

                        We cannot guess what you are doing differently. Automatic indentation is on by default and works correctly in Notepad++ under normal circumstances.

                        You might want to try to download the official portable zip and trying your experiment in that, without making any settings changes. If the portable works right for you, but your installed copy does not, then there is some difference in your settings which is causing the problem. If you have the same problem in the portable copy, then tell us the exact steps you used when showing the problem, so that we can try to replicate under the same circumstances.

                        update: here’s a screencap of it working for me with a portable v8.6

                        update 2: I also noticed that you’re editing a .txt file, but interpreting it as C++ Source. You might want to see if you have the same problem if you name the file .cpp as is usual for C++ source code.

                        MattexDM 1 Reply Last reply Reply Quote 2
                        • MattexDM
                          MattexD @PeterJones
                          last edited by MattexD

                          @PeterJones That check auto-indent was disabled, the problem is solved. Thank you so much for your help and your patience

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