bakkeby / st-flexipatch

An st build with preprocessor directives to decide which patches to include during build time
MIT License
361 stars 108 forks source link

st-flexipatch gives errors when using nvim #54

Closed JimPix1 closed 2 years ago

JimPix1 commented 2 years ago

When I use neovim in st I get these errors:

erresc: unknown csi ESC[22;0;0t

erresc: unknown csi ESC[22;0t

erresc: invalid color j=258, p=?

erresc: unknown csi ESC[23;0;0t

erresc: unknown csi ESC[23;0t

This only happens when I use nvim and I have seen other people with this error but I haven't found a fix for it. I do know that distrotube's build doesn't have this issue however I don't want to switch to his build. These errors annoyingly clog up the ~/.xsession-errors file

bakkeby commented 2 years ago

OK, so 22 and 23 errors can be dealt with by applying the CSI 22, 23 patch for st: https://st.suckless.org/patches/csi_22_23/

This patch adds support for CSI escape sequences 22 and 23, which save and restore window title (for instance nvim does this when opening and closing).

In st-flexipatch this can be enabled using the CSI_22_23_PATCH toggle in patches.h.

bakkeby commented 2 years ago

As for the invalid color error

erresc: invalid color j=258, p=?

It looks like this has been fixed in the upstream st ref. https://git.suckless.org/st/file/st.c.html#l1932

That is applying something slightly different to the OSC 10, 11, 12 #2 patch. I shall have a closer look at this tomorrow.

JimPix1 commented 2 years ago

Thanks for the replies! I'll have to make a new st-flexipatch to apply the CSI_22_23_PATCH so I'll wait until you find a solution for the invalid colour error before doing so :+1:

bakkeby commented 2 years ago

I just pushed changes upgrading to latest master of st (v0.8.5, e823e23, 2022-02-17). The invalid color error is no longer appearing if I start nvim.

JimPix1 commented 2 years ago

Great! So if I just make a new st-flexipatch and apply the CSI_22_23_PATCH I won't get any errors with nvim anymore?

JimPix1 commented 2 years ago

This has indeed solved it