pnedev / comparePlus

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

Flickering Scroll Bar #334

Closed Yaron10 closed 1 year ago

Yaron10 commented 2 years ago

Hello Pavel,

Could you please compare the files from https://github.com/pnedev/comparePlus/issues/329#issuecomment-1320286092?

Activate Test.cpp. Press Last. Mouse-scroll gently up and down.

Result: Test.cpp's vertical scroll bar is flickering.

Thank you. BR

pnedev commented 2 years ago

Hello Yaron,

I'll take a look, thanks.

BR

Yaron10 commented 2 years ago

Hello Pavel,

👍 Thank you. I appreciate it.

BR

pnedev commented 1 year ago

Hello Yaron,

I hope you are doing well.

This issue is fixed in the latest master commit, here is the AppVeyor build. Please write back if there are still issues. Thank you.

BR

Yaron10 commented 1 year ago

Hello my friend Pavel,

I'm fine. Thank you. I hope you're well too.

👍 Excellent! Thank you very much for your work. Much appreciated.

There's an interesting difference between the behavior of the last commit and that of the previous one.

Activate Test.cpp. Press Last. Mouse-scroll gently down.

Last commit: Line 128 is scrolled up and hidden. If you keep gently scrolling down, the white editing area beneath the gray-alignment area (in Test.cpp) is quickly displayed/hidden. IOW: there's some minor flickering in the editor.

Previous commit: Line 128 is not scrolled up and visible. (Line 128 is hidden and you get the minor flickering in the editor only if you're free-scrolling down).

Just an observation. What do you think?

BR

pnedev commented 1 year ago

Hello Yaron,

Sorry for the late reply, I've been pretty busy recently.

Very good observations, thank you :+1: I tried to avoid adding a lot of annotation blanks at the end of the file because that is causing slow refresh when you scroll down beyond the end line and also slow scroll speed. I tried to "simulate" full screen of blank lines when you scroll the other file and also scroll the blank lines up when you scroll nearing the end of the other file (the bigger one). Unfortunately Scintilla seems not able to do that in steps and simply jumps after the blanks scrolling them all up. But still I think its a minor issue and could be considered "the lesser" functionality glitch. That is IMO, what do you think?

Thank you once again, much appreciated.

BR

Yaron10 commented 1 year ago

Hello Pavel,

I hope you had a good time. And thank you again for your time and great work. It's truly appreciated. 👍

I know you use "annotations", but your excellent explanation is above my level. :)

Allow me to ask from a user point of view: If you enable Allow scrolling beyond last line and max-scroll-down, the last line is still visible (NOT in Compare). Would it be possible to achieve what you wanted in the last commit and have the last line visible? That is: let's put aside the minor-editor-flickering being "more common" with the last commit, and focus only on the last line visibility.

And again: not an issue, just a question.

BR

pnedev commented 1 year ago

Hello Yaron,

Would it be possible to achieve what you wanted in the last commit and have the last line visible?

Yes, sure. Do you think it would be better from user perspective? Thank you!

BR

Yaron10 commented 1 year ago

Hello Pavel,

Do you think it would be better from user perspective?

Please remember that I don't understand the improvement you wanted to achieve in https://github.com/pnedev/comparePlus/commit/bd7a446d080c1a925c58e5da15564a74586c2b29. :) If we can get that improvement and have the line visible, it would be better IMO.

Thanks again.

BR

pnedev commented 1 year ago

Hello Yaron,

I made a quick change just to clarify things. Could you please try this build and tell me if this is what you imagined? I think I understand what you mean about the flickering. Is it the flicker you get when you are in the shorter file with the end-of-file blanks and try to scroll down more? If yes it cannot be avoided unless I disable "Scroll beyond last line" Scintilla setting. Otherwise Scintilla tries to scroll one page beyond the last annotation and I forcefully get the view back to the last true line position. Thank you .

BR

Yaron10 commented 1 year ago

Hello Pavel,

Thanks again. I appreciate it. 👍

I'm not sure it's worth your time as it's certainly not an issue. But...

With the test build you can not scroll past line 127. With https://github.com/pnedev/comparePlus/commit/d17ada54ba14369ff5268f301ff6502e6fd9359f you can not scroll past line 128. - This seems slightly better since it's NPP's behavior if Scroll beyond last line is enabled (NOT in Compare).

Is it the flicker you get when you are in the shorter file with the end-of-file blanks and try to scroll down more?

Yes, that's what I meant.

If yes it cannot be avoided...

I assumed that was the case.

Still, the behavior with https://github.com/pnedev/comparePlus/commit/d17ada54ba14369ff5268f301ff6502e6fd9359f is slightly better: on a normal/slow scroll you do not get that flicker.

BR

pnedev commented 1 year ago

Hello Yaron,

Thank you for the feedback my friend, always appreciated.

So I will abandon the test build then. Do you prefer https://github.com/pnedev/comparePlus/commit/d17ada54ba14369ff5268f301ff6502e6fd9359f behavior instead of the last master's commit https://github.com/pnedev/comparePlus/commit/bd7a446d080c1a925c58e5da15564a74586c2b29 ?

BR

Yaron10 commented 1 year ago

Hello Pavel,

Do you prefer https://github.com/pnedev/comparePlus/commit/d17ada54ba14369ff5268f301ff6502e6fd9359f behavior instead of the last master's commit https://github.com/pnedev/comparePlus/commit/bd7a446d080c1a925c58e5da15564a74586c2b29 ?

As far as I can judge and understand, https://github.com/pnedev/comparePlus/commit/d17ada54ba14369ff5268f301ff6502e6fd9359f seems better.

Thank you for your time and patience. I appreciate it. 👍

Happy Holidays!

pnedev commented 1 year ago

Hello Yaron,

Could you please try this build: https://ci.appveyor.com/project/pnedev/compareplus/builds/45776795 ? I have made there the last line to be always visible. Unfortunately the flicker cannot be removed (I have made some optimization changes in https://github.com/pnedev/comparePlus/commit/bd7a446d080c1a925c58e5da15564a74586c2b29 that is better not to be reverted). Thank you!

Happy holidays to you too!

Yaron10 commented 1 year ago

Hello Pavel,

Great!

Unfortunately the flicker cannot be removed (I have made some optimization changes in https://github.com/pnedev/comparePlus/commit/bd7a446d080c1a925c58e5da15564a74586c2b29 that is better not to be reverted).

👍

Thanks again. I appreciate it.