-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Macros mangle my files #15110
Comments
The macro seems to work ok for me. Some comments on the macro that probably don't matter:
You make a point of emphasizing enabling of virtual space. I tried it with your macro in various conditions and it didn't make a difference, but, have you tried disabling virtual space and seeing if it changes the macro operation for you? What is the "SearchPlus" plugin? -- I've never encountered that one. |
Thanks @alankilborn for trying to reproduce. I added a video of the reproduction using Notepad++ source code. Luckily I was able to reproduce it on the very first file I attempted to alter! I also updated the original report with the new understanding of the bug that I had after intentionally trying to reproduce it. I also removed that "SearchPlus" plugin, which made no difference. In the video I addressed your other questions. |
UPADATE #2: I had to do the exact same transformation to another project, so I installed an older version hoping the issue would go away, but it didn't. This really puzzles me...how come I've never encountered this issue in the past? I've been using Notepad++ for a very long time, I've never ran into this trouble. Why now? Could some OS change be affecting it? |
Notepad.Macro.Bug.Inserting.Extra.Lines.mp4
Is there an existing issue for this?
Description of the Issue
See attached video showing the bug. The point of counting the usage of the macro in the video that I forgot to mention in the video is that is the number of unexpected new lines that Notepad++ inserts into the code.
I use macros all the time to transform software code files, probably 2 months ago was the last time I used it until today. With this latest update, it is mangling my code text with extra new line characters in random places. I'm not really sure how to describe what it is doing because it is so random and so different from past experiences I can only say it must be a bug.
ALSO it is intermittent. I've had it happen on the first file I used the macro on. I've also had it happen after 4-8 files with no issues, then the issue comes up and Notepad++ starts flaking out. If I don't close and restart Notepad++, after sometime Notepad++ will crash.
The only thing different that I am doing than I've done in the past is that I turned on "enable virtual space", which was necessary to accomplish the transformations I was doing.
Preferences -> Editing 1 -> Enable Virtual Space
I am not using extra plugins (I had one installed "SearchPlus", but later I removed it and re-did the test and it reproduced without it). Otherwise I am just using what comes with Notepad++ when I download it.
Steps To Reproduce
For the video I used the Notepad++ source code that I got from GitHub. But for my original issue...
The purpose of this macro is to add a log entry before calling an API in Python Pytest code. The end result would look like the following...
# Some comment or other line of code up here.
Test.log('PLACEHOLDER - There should be a meaningful log entry here.')
initial_count = test_user.query("countSomething", {"version": version})
So this macro adds the "Test.log" line to the code directly above the query call.
The macro:
Home
Ctrl+Alt+Enter
Down Arrow
Up Arrow
Ctrl+V
F3
F3
Current Behavior
In a few cases it was worse as it added line breaks in multiple spots of a data structure.
Expected Behavior
Debug Information
Anything else?
No response
The text was updated successfully, but these errors were encountered: