Closed Matteo-Nigro closed 12 months ago
can't reproduce the bug after some tries.
Lines are painted inside EditView::PaintText()
:
https://github.com/zufuliu/notepad2/blob/f10f6ab25818fdcf31a9c477b12d34b119ffa125/scintilla/src/EditView.cxx#L2772-L2774
You can change #if 0
to #if 1
then adding logs inside EditView::PaintText()
, Editor::Paint()
, etc. to see what happened?
https://github.com/zufuliu/notepad2/blob/f10f6ab25818fdcf31a9c477b12d34b119ffa125/src/Notepad2.c#L510-L514
Hi @zufuliu, I have SOLVED 🎉 🎉 🎉 🎉 🎉 ! I did as you told me but got no meaningful response from the logs. I didn't realise that I had unintentionally set the zoom in the editor to 110%.... By resetting the zoom to 100% the problem disappeared. I don't know if this is just my problem or if it could be a potential bug.
Not reproduce with 110% (or others) zoom level.
Update: I confirm that if I open the text file by double-clicking the problem no longer occurs, but if I open the files by dragging them into the application, the problem persists. The editor only updates after the first click. With files with coloured syntax, no problem. I attach gifs:
That's really wild, the code for drag & drop is inside MsgDropFiles()
:
https://github.com/zufuliu/notepad2/blob/f10f6ab25818fdcf31a9c477b12d34b119ffa125/src/Notepad2.c#L1036-L1038
Further update:
I figured out which parameter is "triggering" the problem... deleting my configuration .ini file everything worked... Deleting one item at a time I realized that the problem lies in the ShowBookmarkMargin
activation . Keeping it deactivated even with different zoom levels the bug no longer occurs for me. In your test I see that it is deactivated... Can you check if the problem also occurs to you by enabling this option?
I think it's something inside this function or related to it:
https://github.com/zufuliu/notepad2/blob/f10f6ab25818fdcf31a9c477b12d34b119ffa125/src/Styles.c#L2969-L3013
I think it could be a good lead to follow 😎
OK, reproduced with ShowBookmarkMargin
enabled.
Fixed by 3e84cce7460783cde3a9562bbe42542a39db36af.
Hi @Matteo-Nigro, please help test latest code, I'm planing to make a new release on Monday, thanks.
Hi @zufuliu , I confirm that after https://github.com/zufuliu/notepad2/commit/3e84cce7460783cde3a9562bbe42542a39db36af the problem no longer occurs. 🎉 Thanks for the hotfix!
Hi @zufuliu! I wanted to report a problem I am experiencing.... Nothing serious, but it's annoying. It often happens (but not always) that when I open .txt files (at the moment it seems to me the only format with the problem) only the first line of the file content is shown. After the first click anywhere in the program, the entire contents are shown. At the moment I use Direct 2D as rendering technology, I haven't tried anything else for the moment... Any ideas on how to solve this? As always, thank you 😉!
After the first click: