gnotclub / xst

st fork that uses Xresources and some pretty good patches
MIT License
536 stars 74 forks source link

Xresources's scrollrate messes with internal kscrollup/down calls #116

Closed nikp123 closed 3 years ago

nikp123 commented 3 years ago

Anyway whenever kscrollup/down is called in the code, the scroll movement always gets limited to the value set by st.scrollrate set in the Xresources file. That means fxp. whenever I try to scroll up, but I need to type something out, the terminal moves down by st.scrollrate instead of just jumping down to the last line, like it regularly would.

NOTE: This patch considers that no one changed the default Arg.i = 1 in the config.h file and instead fixes the issue for users that use Xresources values, since in that case the kscrollup/down functions will get always called with Arg.i set to 1.

actionless commented 3 years ago

This patch considers that no one changed the default Arg.i = 1 in the config.h file and instead fixes the issue for users that use Xresources values, since in that case the kscrollup/down functions will get always called with Arg.i set to 1.

could you rephrase this somehow?

nikp123 commented 3 years ago

This patch considers that no one changed the default Arg.i = 1 in the config.h file and instead fixes the issue for users that use Xresources values, since in that case the kscrollup/down functions will get always called with Arg.i set to 1.

could you rephrase this somehow?

In layman's terms: The patch ONLY works for people that dont change the scrollrate inside of config.h

actionless commented 3 years ago

it should check both, just prioritize the one from Xresources

nikp123 commented 3 years ago

Sorry forgot that there was a literal scrollrate in config.

I meant that the default arguments for the kscrollup/down dont get changed in config.h This: ShiftMask, XK_Page_Up, kscrollup, {.i = -1} },

But since I'm unable to test atm, please verify if the code behaves as described.

actionless commented 3 years ago

ah, you mean hotkeys

i've checked with the mouse -- seems to be fine, thanks!