Suckless patching, can't locate code to patch

I was installing some patches to suckless st and it was no problem till I tried installing the “scrollback-mouse-incremental” patch (installed the prior scrolling patches successfully).
I was trying to locate the code to be patched in vim, but no luck.

Image:

Maybe I am misunderstanding something?

Thanks.

Hi,

The patch file shows you the lines to modify, here 163 and 164.
You usually need to use the patch command to apply a patch. See man patch.

applying

download this patch and go to st’s source directory and patch < path_to_patch. if there are any errors check files with .rej and manually apply it

Thank you for the reply,

I have done that and in the image I posted, I show both the original file and the .rej file. The lines mentioned in the .rej file are not there in the original file, or at least, I can’t seem to find them.

In the following image, I go to the specified lines 163 tp 164. The line mentioned is not there.

(bottom file is the .rej and the top is the original file at line 163, col 8)

I used patch -p1 < /path/to/patch to apply it

Thanks

Thanks for the quick reply,

I clarified some things to another reply on this thread, namely that line 163 and 164 don’t have the corresponding lines as mentioned in the .rej file

see here: Suckless patching, can't locate code to patch - #4 by SemogEnaz

Thanks.

have you used 0.8.2 in these :point_down:

2019 one doesn’t support incremental speed patch as far i can tell

No, for all the scroll back ones, I went with the bottom-most one, here it is st-scrollback-mouse-2019024…
Should I try 0.8.2?
I can try that and reply how it went.

see the second note

ofc because increment is also 0.8.2

dman, I cannot understand it at all. Real newbie moment lol

1 Like

So, I am just applying the patches from the beginning, for the scroll back patches, what order do you recommend installing them in, Like, should I install the 0.8.x ones only?

Thanks

i tried to get to the increment patch but for shift+mousewheel all patches are failing except 2019. you can manually patch 0.8.4 > 0.8.2 > increment. better off with luke’s st build or using alacritty (like me :wink: )

So, I think this is somewhat a solution:

Ignoring the line mentioned in the .rej file, I was able to locate lines in the mshortcuts array.


(2 highlighted lines correspond to the lines we need to change, here I have alredy applied the change needed)

Again, I have ignored the config.def.h.rej, it mentions Button4 and Button5 to have masks as “ShiftMask”.

and so the only change for this patch must be that of
.i = 1.i = mousescrollincrement

After making this change and compiling the program successfully, I have not noticed any real change in the scroll speed or anything else. Maybe I have screwed up and someone can correct me, thanks.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.