Bug report: Indented and aligned carriage return not working
-
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
-
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…
-
@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) -
@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
andTab
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 pressEnter
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… :-)
-
Perhaps THIS ISSUE is relevant? It’s all a guessing game until OP provides more information.
-
@mkupper I wanted to make a small film but I’ll settle for.
The example is on the second structas 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
-
@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.
-
@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 -
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?
-
@PeterJones I tried to check both things but it still doesn’t work correctly, in fact it doesn’t respect the correct indentation
-
@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.
-
@PeterJones That check auto-indent was disabled, the problem is solved. Thank you so much for your help and your patience