indentbyfold
indentbyfold copied to clipboard
Not reindenting complete file
Is it correct that Redentbyfiold, only redent's what is in view ? If so can there be an option to redent complete file ? If not why is my PHP file not redentend completely
+1 Issue still here in 2020
Just tried to reproduce this, but failed:
This is what I did:
- Created a copy of
IBFPlugin.cpp
- Opened with N++
- Copied the content of the file and pasted three times. This results in a file of over 1000 lines.
- Pressed
Ctrl+A
andShift+Tab
a couple of time. All the indents on all the lines are gone. - Saved the file.
- Closed N++ completely.
- Opened that file with N++ and started the
Reindent File
immediately after opening the file. - The entire file is reindented.
What did I miss?
@ffes Hi again. I was going to record the screen to prove my point when I detected that I had done 2 pages this time. on closer examination and a few tests, I found that we both had right..
if I press the reindent function, and let notepad++ be alone for a few seconds, it works perfectly, but the others must have done what I did the first time. we scrolled down.
Apparently when you're scrolling down, you interrupt the plugin, and therefore was not the whole code converted. May I suggest a "progress" bar, or something that stops the user from scrolling while the plug-in is doing what it's supposed to do?
Edit; got dropped to EDGE, causing my comment to be published twice. just wanted to say that now when I waited, and it worked, your plugin solved an issue I have been trying to locate the whole day... thx!
That's a very interesting observation!
I will investigate it.
My observations.
- @Nemesis77swe's theory that the users cancels the process doesn't seem to be true.
- Suddenly the problem happens to me as well in the process I describe myself above, consistently. Why it worked before? No clue.
- The plugin goes through all the lines and appears to do what is it supposed to (but it doesn't)
- When I go to the last line (
Ctrl+End
) and reindent again and back to the top (Ctrl+Home
), it works as expected. - When I do that (go to the last line and reindent all lines) in code it doesn't work.
- I haven't got a clue why this all happens:
¯\_(ツ)_/¯
- Could be something in Scintilla (the editor component N++ uses) or N++ itself, but it could very well be something in the plugin.
So as a workaround: When you want to use this function, go to the last line and run the reindent function and it should work
I considered adding a message box with a warning. But that is gonna annoy very soon, so I'm not gonna do that. I will add a FAQ-item to the docs and explain it. And I've pinned this issue.
Good!, well not good that it don't work, but that you also saw this, so I wasn't going crazy 😆! and again, thx for a great plugin.
From: Frank Fesevur [email protected] To: ffes/indentbyfold [email protected] CC: Nemesis77swe [email protected], Mention [email protected] Received: 18 Oct 2020 2:27:00 p.m. Subject: Re: [ffes/indentbyfold] Not reindenting complete file (#2)
My observations.
-
@Nemesis77swe[https://github.com/Nemesis77swe]'s theory that the users cancels the process doesn't seem to be true.
-
Suddenly the problem happens to me as well in the process I describe myself above, consistently. Why it worked before? No clue.
-
The plugin goes through all the lines and appears to do what is it supposed to (but it doesn't)
-
When I go to the last line (Ctrl+End) and reindent again and back to the top (Ctrl+Home), it works as expected.
-
When I do that (go to the last line and reindent all lines) in code it doesn't work.
-
I haven't got a clue why this all happens: ¯_(ツ)_/¯
-
Could be something in Scintilla (the editor component N++ uses) or N++ itself, but it could very well be something in the plugin.
So as a workaround: When you want to use this function, go to the last line and run the reindent function and it should work
I considered adding a message box with a warning. But that is gonna annoy very soon, so I'm not gonna do that. I will add a FAQ-item to the docs and explain it. And I've pinned this issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[https://github.com/ffes/indentbyfold/issues/2#issuecomment-711160585], or unsubscribe[https://github.com/notifications/unsubscribe-auth/AJWHILMHX3VF2G6VVOZFZTDSLLNJFANCNFSM4BYHL6AA]. [https://github.com/notifications/beacon/AJWHILME6Q7TBVRIFQSGKTLSLLNJFA5CNFSM4BYHL6AKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFJRXGCI.gif]
I added a FAQ item about this issue: https://indentbyfold.readthedocs.io/en/latest/faq.html#faq-reindent-fails