eteran / nedit-ng

a Qt5 port of the NEdit using modern C++14
GNU General Public License v2.0
96 stars 26 forks source link

auto scroll preference has no effect #296

Closed tksoh closed 3 years ago

tksoh commented 3 years ago

Using commit 959597a9c1bf2ad07aae3ec34667b0f6b2f82dca

With the preference enabled, NG does not automatically scroll the lines up/down according to the padding value, even though we have not reached the start/end of the file:

nedit.autoScroll=true nedit.autoScrollVPadding=4

eteran commented 3 years ago

Hmm, I'm pretty sure that this logic was not removed in the port, so I'll have to see what the difference in behavior is.

Is it basically that (given the above settings), we should expect it to scroll if the cursor is within 4 lines of the top/bottom?

tksoh commented 3 years ago

that's what the doc says, and apparently how it works in nedit 5.

When this option is enabled the window will automatically scroll when the cursor comes 4 lines from the top or bottom of the window (except at the beginning of the file). The number of lines can be customized with the nedit.autoScrollVPadding setting in the config.ini file.

eteran commented 3 years ago

Van we confirm that NEdit5 behaves as expected? Just to be sure?

tksoh commented 3 years ago

I have confirmed it, naturally. Else I wouldn't have known it doesn't work on NG 😅

eteran commented 3 years ago

Fair enough 😜, I'll try to reproduce locally and go from there.

eteran commented 3 years ago

I can say that the version of NG that will tender a partial line may just simply not handle this right because that build just simply pretends that there is one extra line.

I think you are using that one, so just as a heads up, I'll be trying to reproduce this on the current master.

tksoh commented 3 years ago

I tried commit 9e9acf13b028d86a5a9951b3534a5a71bcad6d7c, and it has the same problem

eteran commented 3 years ago

@tksoh Confirmed.

For some reason, the dragState_ is not being reset, which effectively perminantly disables the feature. Looking into it.

eteran commented 3 years ago

I believe it should be fixed in master now. Accidentally had inverted a single condition. Once restored, appears to work the same as NEdit5 as far as I can tell.

Please re-open if the issue is still present :-)