• Login
Community
  • Login

Bug report: Indented and aligned carriage return not working

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
13 Posts 5 Posters 1.1k 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.
  • M
    MattexD
    last edited by Nov 29, 2023, 10:09 AM

    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.

    T A M 3 Replies Last reply Nov 29, 2023, 10:25 AM Reply Quote 0
    • T
      Terry R @MattexD
      last edited by Terry R Nov 29, 2023, 10:26 AM Nov 29, 2023, 10:25 AM

      @MattexD

      Be aware we have a FAQ post here that refers you to github for postings bugs. Read it first, but before posting there, could you expand with your debug info, under the ? Menu, copy and paste it here.

      Possibly try the same situation without any plug-ins running. That FAQ post is here. Although you don’t have a crash issue, it helps you to understand how to run without all or some plug-ins. Possibly the issue lies with a plug-in rather than Notepad++ and this will help narrow it down.

      If you do get other members supporting your theory (so do post that additional info here), and they will help identify it if you can do some of this work, all this detail goes into that bug post on github.

      Terry

      M 1 Reply Last reply Nov 29, 2023, 11:21 AM Reply Quote 1
      • A
        Alan Kilborn @MattexD
        last edited by Nov 29, 2023, 11:01 AM

        @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
        • M
          MattexD @Terry R
          last edited by Nov 29, 2023, 11:21 AM

          @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
          • M
            mkupper @MattexD
            last edited by Nov 29, 2023, 6:04 PM

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

            M 1 Reply Last reply Nov 30, 2023, 8:43 AM Reply Quote 2
            • A
              Alan Kilborn
              last edited by Nov 29, 2023, 6:26 PM

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

              1 Reply Last reply Reply Quote 3
              • M
                MattexD @mkupper
                last edited by MattexD Nov 30, 2023, 8:49 AM Nov 30, 2023, 8:43 AM

                @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

                A P 2 Replies Last reply Nov 30, 2023, 11:03 AM Reply Quote 1
                • A
                  Alan Kilborn @MattexD
                  last edited by Nov 30, 2023, 11:03 AM

                  @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
                  • P
                    PeterJones @MattexD
                    last edited by PeterJones Nov 30, 2023, 2:10 PM Nov 30, 2023, 2:10 PM

                    @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

                    M 1 Reply Last reply Nov 30, 2023, 3:44 PM Reply Quote 3
                    • A
                      Alan Kilborn
                      last edited by Alan Kilborn Nov 30, 2023, 2:30 PM Nov 30, 2023, 2:29 PM

                      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
                      • M
                        MattexD @PeterJones
                        last edited by MattexD Nov 30, 2023, 3:45 PM Nov 30, 2023, 3:44 PM

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

                        P 1 Reply Last reply Nov 30, 2023, 4:28 PM Reply Quote 0
                        • P
                          PeterJones @MattexD
                          last edited by PeterJones Nov 30, 2023, 4:42 PM Nov 30, 2023, 4:28 PM

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

                          M 1 Reply Last reply Nov 30, 2023, 4:49 PM Reply Quote 2
                          • M
                            MattexD @PeterJones
                            last edited by MattexD Nov 30, 2023, 4:50 PM Nov 30, 2023, 4:49 PM

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