-
Notifications
You must be signed in to change notification settings - Fork 1
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
elastic tabstops are not applied after npp start #9
Comments
Thank you for your report. I think I know what is happening, but I'm not sure. Bear with me, if you will. Columns++ (like Notepad++) only saves its settings when you close Notepad++. If you have multiple instances of Notepad++ open, the various instances do not communicate with one another, and as each is closed, it overwrites previously saved settings with whatever settings it had. So if you change settings when you have multiple Notepad++ windows open, only the settings from the last window closed will be remembered. For the time being, I've considered it "acceptable" to work that way, but in the longer term I need to come up with something more in line with users' expectations. I am not sure if that explains everything you are experiencing, though. Would you be willing to try something?: Close all instances of Notepad++ and open just one instance. In that one instance, open a .tsv file and make sure the settings are the same as you have above (Tabular profile automatic for *.tsv, General for profiles without a specific extension). If they're not the same, change them and click OK. Then close that instance. Then, use Notepad++ as you usually would (including multiple instances) and see if it behaves as expected. Thank you for your patience. If it's the "known behavior" I described, I do plan to improve the way Columns++ handles multiple instances. If something else is (also) wrong, narrowing that down and excluding the known behavior will be very helpful. |
I have just one instance of npp running (win x64 with c++ 0.2.1.7-alpha) and not multiple. If I enable elastic tabs, a tsv gets aligned correctly. If I close npp and open it again, it opens the last opened files but does not align it. Elastic tabstops are still enabled and profile settings are configured as shown above. |
Thank you for the clarification. This is definitely a bug... unfortunately, I haven’t been able to reproduce it here. Can you tell me, when you open Notepad++ and the file is not aligned, if you switch to another tab (open a new, empty tab if there are no other tabs) and switch back, does it then align on its own? Or do you have to disable and re-enable Elastic tabstops to get it to work? Again, thank you for your patience. Your help in identifying this problem is much appreciated. |
I could not reproduce it with Notepad++ v8.4.8 and will check the version on my computer at work, tomorrow. |
Thank you so much for this. I haven't yet tested with older versions of Notepad++; knowing the version number of a version on which this error occurs will certainly help point me toward finding the cause of the misbehavior and improving the reliability of Columns++. |
The described bug occurs on both my work computers. Both are running Win10 x64 and Npp x64 but different versions (v8.4.6, v8.5.2). Does Cpp has any debug log which I can enable? |
And I'm running WIndows 10 here, 8.4.8 32 bit and 8.5.2 64-bit. So whatever it is, it doesn't seem related to either Windows version or Notepad++ version. I don't (yet) have any sort of debug logging facility. Can you tell me if this happens when you open a file in an already open instance of Notepad++, or only when the file opens during startup? When this happens, if you scroll the file (e.g., Page Down and then Page Up), does it format correctly? If you switch to another tab in the same instance (or Ctrl+N to open a new tab) and then switch back, does the file format correctly? If you type a single Enter before the first character of the file (thus adding a blank line at the top), does it format correctly? I apologize for so many questions... knowing these things will help me narrow the possibilities for what could be going wrong, so I can try to come up with a "test" version for you to see if it solves the problem. Thank you for your patience. Is the set of other plugins installed on your work computers different from what's installed on your home computer? |
It happens in both cases.
No
No
Yes. It also formats correctly, if I execute File -> Reload from Disk
No, only standard plugins and Cpp is loaded. I've disabled the standard plugins but it does not matter. I've also disabled 'Auto-indent' in the settings bot it does not matter, either. It is also independent, if I have a blank session or a session with many different tabs. I've also reverted all settings of Npp to the defaults but still no difference. |
Thank you very much for this information. I will look for a plausible cause for this fault and create a "test" version soon. |
I think that Version 0.2.2 might fix this. When you have time to try it, let me know if it works. Thank you! If it's interesting to you: My hypothesis is that for unknown reasons, the messages from Notepad++ and Scintilla (the edit control used by Notepad++) that tell plugins when various things change must be arriving in a different order on some systems than on others. I made a guess at the most likely variation in order and made a change in the code that should make it work for either order. My guess could be wrong, though... |
Version 0.2.2 fixed the problem. Many thanks for it! :-) |
One Problem remains: If I switch between tabs, the rendering falls back to non-elastic tab stops except if the cursor is on the first line. Than you can see how it aligns right after tab switching. |
If you know: Is this new with 0.2.2, or was it happening before, too? When you've switched tabs and the alignment is incorrect, if you switch to another application that covers the Notepad++ window and then switch back, does anything change? I'm not sure how this could be relevant, but do you access your work computers remotely? |
I can't check this on my home computer because the original issue happens only on my work computers.
No, directly. Maybe, the problem has to do with the way, C++ maintains the view. Here is a screen cast showing the realignment after switching the tabs: C__Users_Walter_Downloads_Viruses.scaffolds.tsv.-.Notepad++.2023-04-26.21-50-09.mp4 |
I've been thinking about this, but so far I can't guess what could be wrong. Let me be sure I understand what is happening. Is all this correct?:
Did you notice whether this behavior also happened with 0.2.1.7 (after you once disabled and re-enabled elastic tabstops to make it work on a particular tab, if you then switched away from and back to the tab again) or if it's new with 0.2.2? (If you didn't notice or don't remember, don't re-install 0.2.1.7 just to check it... I'm just gathering information, not sure what will be the clue I need, so it isn't worth the trouble.) Thank you again for your reports and your patience. |
Even if Elastic tabstops are enabled, they are not applied if a fresh instance of Npp is started. They are only applied after disabling and re-enabling it. It also does not work if "Automatically enable this profile when opening *.tsv files." is enabled in the profile settings and a I open a tsv file smaller than 1 MB with 264 lines (see screenshot).
The text was updated successfully, but these errors were encountered: