juliusHuelsmann / st-history-vim

Development of the "vim patch" and a minimalist "history patch" for the suckless simple terminal (st).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

segment fault when applied on top of st-clipboard patch

smartding opened this issue · comments

commented

Not sure if this is the right place to report error about the st "vim browse" patch, I found link of this repo on the web page of that patch.

After I apply the "vim browse" patch on top of the clipboard patch, which adds just one line to st's source code. I get a segment fault error from st.

Step to reproduce:

  1. checkout st at commit 9ba7ecf
  2. apply the vim browse patch, I tried the 2 versions based on commit 9ba7ecf listed on the patch web page, they all have the same problem:
    1. st-vimBrowse-20200607-9ba7ecf.diff
    2. st-vimBrowse-latestRelease-9ba7ecf.diff
  3. apply the clipboard patch
  4. build and run st
  5. select something with the left button of mouse
  6. wait 3-4 seconds

Now st segment faults.

I'm using latest archlinux, btw

commented

if I revert the change to the clipcopy function in x.c, i.e. I deleted the line xsetsel(getsel()); added by the vim browse patch, then there's no segment fault, not really sure why...

Hey!
Thanks for reporting this incompatibility and proposing a solution! :)
I'm currently busy finishing my Master Thesis, I'll look into this issue at the beginning of 2021 when I've got more time on my hands.

Thanks for the fix, it's been a while since I wrote this part of the patch and I am not entirely sure why I introduced an updated call to xsetsel which I now consider unnecessary. Merged into the patch's new version!