New line auto-indent does not work while recording a macro
Tested in Notepad++ v6.9.2
OBSERVED: Generally, when user presses return to start new line from a line of text which is indented (by one or more presses of tab key), the new line inherits/copies the indent from the previous line. This is expected behaviour. However, if user is recording a macro, then presses return to start new line from a line of text which is indented, the new line starts without any indent.
EXPECTED: New lines should inherit the indent from the previous line in all circumstances. Recording a macro should not modify program behaviour.
TO REPRODUCE:
- Start new text file.
- Press tab to indent.
- Type some text.
- Press return. Observe new line starts with the indent from the line above.
- Start recording a macro.
- The input cursor should be indented. Type some text.
- Press return. Observe new line starts without any indentation.
reproduced in 7.3.3 a tricky workaround is to copy / paste the indentation within the macro
Any movement on this bug? I'm having the same issue.
Note: In my personal case, I was wanting to make a macro that I realized is accomplished by turning on AutoComplete for { in the settings.
Still a problem in v7.9. I hope this issue can be addressed some time soon!
reproduced in 7.3.3 a tricky workaround is to copy / paste the indentation within the macro
This workaround works.
If anyone is interested how to record a macro that would respect the indentation do it like this:
- start recording the macro
- press home
- press shift + home
- press ctrl + c
- press end
- press enter
- press ctrl + v
- stop recording the macro and save
I found the same issue.
Debug info
Notepad++ v8.1.9 (64-bit) Build time : Oct 21 2021 - 23:37:53 Path : C:\Program Files\Notepad++\notepad++.exe Command Line : "D:\Workspace\InputData.cpp" Admin mode : OFF Local Conf mode : OFF Cloud Config : OFF OS Name : Windows 10 Pro (64-bit) OS Version : 2009 OS Build : 19043.1348 Current ANSI codepage : 1252 Plugins : mimeTools.dll NppConverter.dll NppExport.dll NppGTags.dll
Still seems to be happening in 8.6.8
reproduced in 7.3.3 a tricky workaround is to copy / paste the indentation within the macro
This workaround works.
You can use the duplicate line functionality as an option that doesn't overwrite your clipboard.
- start recording the macro
- press
CTRL+D - press
DOWN ARROW - press
END - press
SHIFT+HOME - press
DELETE - . . . whatever you wanted to do after adding auto-indented line . . .
- stop recording the macro and save