pnedev / comparePlus

Compare plugin for Notepad++
GNU General Public License v3.0
961 stars 139 forks source link

Issue when using Compare alongside CSV Lint plugin #355

Closed harveyadcock closed 1 year ago

harveyadcock commented 1 year ago

When using Compare against two CSV Linted files (plug-in name CSV Lint version 0.4.6.2, Compare v2.0.2) in Light Mode and then clearing the compare, either through clearing active compares or all compares, results in a black highlight of the cursor’s current row on all tabs similar to what is used in Dark Mode until Notepad++ is restarted or until Dark Mode is toggled on and off within stock Notepad++’s settings.

Uninstalling CSV Lint prevents this issue, as does not having the “CSVLint” option turned on at the top of the “Language” NP++ toolbar menu for the documents.

This issue also isn’t triggered by just moving a document to other view by right clicking on the tab and then closing the split view by moving the document back to the other view again, so seems to be specific to something with Compare.

setting enabled for CSVLint: IMG_0113

Before comparing and clearing compare, highlight is a light grey: IMG_0114

After comparing and clearing compare, highlight is black and certain characters become unreadable: IMG_0115

pnedev commented 1 year ago

Hi, Could you check if this is the current cursor line highlight by changing the line where the caret (cursor) is positioned?

harveyadcock commented 1 year ago

Hi, yes it is the current cursor line highlight as opposed to a static highlight of a specific line. Changing lines within the same document or even going to different documents (CSV Linted or not) still has the current cursor line highlighted in black until either toggling Dark Mode or closing & reopening NP++

pnedev commented 1 year ago

Thanks for confirming. I am no longer supporting Compare plugin v2 (it is not made to handle the new Notepad++ versions light/dark modes) so could you please check the ComparePlus plugin (I have made it as a very enhanced replacement of the original Compare for the latest Notepad++ versions - 8.3.3 onward). Tell me if you experience the same problem with ComparePlus.

harveyadcock commented 1 year ago

Ah ok, I didn’t realise this. I’ve just installed ComparePlus and removed Compare and rerun the same test setup, but I still get the current cursor line black highlight bug. And it also is fixed by toggling Dark Mode or reopening NP++

pnedev commented 1 year ago

OK, I'll check that, thanks

harveyadcock commented 1 year ago

Thanks for the fast response! Let me know if there’s anything I can help with.

pnedev commented 1 year ago

Hi again @harveyadcock ,

I made some experiments and think that CSVLint plugin is not managing the caret line background in an optimal way (setting its preferred style and restoring it after for the corresponding Scintilla view). ComparePlus is also modifying the caret line background (for both editor views) in order to make the diffs coloring visible (I cannot avoid that) and after compare is closed it restores the original setting. When both plugins try to do that they interfere with each other and if the previous caret line background is not properly stored and restored afterwards problems such as that might occur. You could open a separate issue in CSVLint plugin repository so @BdR76 could test on his end and see if he can improve the background handling there but unfortunately I cannot do anything on my side (in ComparePlus plugin) to work around that issue.

The good news is that even if he couldn't fix it in CSVLint either or until it is done and the new plugin version released you could circumvent that problem by setting TransparentCurs CSVLint parameter to False. You will find it in CSVLint Settings.

I cannot do anything more regarding that so I'm closing the issue here. If you have further questions or concerns please write again in that thread or open a new issue. Thanks.

BR

harveyadcock commented 1 year ago

Yes, that workaround in the CSVLint settings works great, thanks for the suggestion! Will raise an issue on the CSVLint repo as well, thanks for all your help.