[dev] [st] Use after free in font cache

2017-08-27 Thread dequis
Hi, got some crashes. Looks like st is calling XftFontClose in the last member of the font cache array when it runs out of space in it, but that xft font is still used somewhere else. To reproduce: 1. Make the font cache array smaller, in x.c "static Fontcache frc[1];" 2. wget https://www.cl.cam.

[dev] [st] [PATCH] Fix extra bracketed paste markers when pasting >8kb

2015-09-24 Thread dequis
Before this patch, when pasting over BUFSIZE (8192 bytes here), st would do the following: \e[200~...8192 bytes...\e[201~\e[200~...remaining bytes...\e[201~ With this patch, the start marker is only sent when the offset is 0 (at the beginning of selnotify) and the end marker is only sent when

Re: [dev] [PATCH] Replace character with U+FFFD if wcwidth() is -1

2014-10-28 Thread dequis
On 28 October 2014 08:54, Dmitrij D. Czarkoff wrote: > Helpful when new Unicode codepoints are not recognized by libc. In practice, this only makes things worse by not displaying characters that are perfectly supported by fontconfig and xft, but not by libc. But... whatever.

Re: [dev] [PATCH] [st] Use inverted defaultbg/fg for selection when bg/fg are the same

2014-10-27 Thread dequis
On 27 October 2014 11:54, Martti Kühne wrote: > On Mon, Oct 27, 2014 at 3:01 AM, dequis wrote: >> The background/foreground of selected text is currently set by setting >> ATTR_REVERSE, which flips its normal bg/fg. When the text being >> selected has the same bg and fg,

[dev] [PATCH] [st] Use inverted defaultbg/fg for selection when bg/fg are the same

2014-10-26 Thread dequis
Sep 17 00:00:00 2001 From: dequis Date: Sun, 26 Oct 2014 22:39:46 -0300 Subject: [PATCH] Use inverted defaultbg/fg for selection when bg/fg are the same The background/foreground of selected text is currently set by setting ATTR_REVERSE, which flips its normal bg/fg. When the text being selected

Re: [dev] [PATCH] [st] Fix issues with wcwidth() returning -1 for unsupported unicode chars

2014-10-26 Thread dequis
On 26 October 2014 19:36, Dmitrij D. Czarkoff wrote: > Apparently no workaround is needed - just use sane libc or avoid using > new codepoints until glibc fixes that. Or, if you won't feel dirty > after that, send a patch to glibc instead. 'Just using musl' doesn't seem feasible given a glibc-ba

[dev] [PATCH] [st] Fix issues with wcwidth() returning -1 for unsupported unicode chars

2014-10-25 Thread dequis
tm [2]: http://stackoverflow.com/questions/16371418/why-does-wcwidth-return-1-with-a-sign-that-i-can-print-on-the-terminal [3]: http://i.imgur.com/MDzMJJH.gif [4]: http://www.fileformat.info/info/unicode/char/0524/index.htm From 810937df2c8a693deb26ac278c73f0147353079b Mon Sep 17 00:00:00 2001 Fr