68d1ad9b — Hiltjo Posthuma 3 months ago
bump version to 0.9
00085199 — Hiltjo Posthuma 4 months ago
FAQ: document the color emojis crash issue which affected some systems is fixed

It is fixed in libXft 2.3.6:

st: use `void' to indicate an empty parameter list
parseurl: Add !

Signed-off-by: Страхиња Радић <contact@strahinja.org>
baa9357e — Hiltjo Posthuma 8 months ago
Makefile: add manual path for OpenBSD
code-golfing: cleanup osc color related code

* adds missing function prototype
* move xgetcolor() prototype to win.h (that's where all the other x.c
  func prototype seems to be declared at)
* check for snprintf error/truncation
* reduces code duplication for osc 10/11/12
* unify osc_color_response() and osc4_color_response() into a single function

the latter two was suggested by Quentin Rameau in his patch review on
the hackers list.
Merge branch 'master' of git.sr.ht:~strahinja/st
config.mk: Change prefix

Signed-off-by: Страхиња Радић <contact@strahinja.org>
base64_digits: reduce scope, implicit zero, +1 size

the array is not accessed outside of base64dec() so it makes sense to
limit it's scope to the related function. the static-storage duration of
the array is kept intact.

this also removes unnecessary explicit zeroing from the start and end of
the array. anything that wasn't explicitly zero-ed will now be
implicitly zero-ed instead.

the validity of the new array can be easily confirmed via running this
trivial loop:

	for (int i = 0; i < 255; ++i)
		assert(base64_digits[i] == base64_digits_old[i]);

lastly, as pointed out by Roberto, the array needs to have 256 elements
in order to able access it as any unsigned char as an index; the
previous array had 255.

however, this array will only be accessed at indexes which are
isprint() || '=' (see `base64dec_getc()`), so reducing the size of the
array to the highest printable ascii char (127 AFAIK) + 1 might also be
a valid strategy.
avoid potential UB when using isprint()

all the ctype.h functions' argument must be representable as an unsigned
char or as EOF, otherwise the behavior is undefined.
2aefa348 — Zacchary Dempsey-Plante 10 months ago
make underlines and strikethroughs respect `chscale`
.gitignore: Add .redo

Signed-off-by: Страхиња Радић <contact@strahinja.org>
parseurl: Convert to POSIX shell

Signed-off-by: Страхиња Радић <contact@strahinja.org>
e823e230 — Santtu Lakkala 11 months ago
Delay redrawals on palette changes

Build on auto-sync and only mark window dirty on palette changes and let
the event handler do the actual draw.
2c5edf28 — Hiltjo Posthuma 1 year, 16 days ago
X10/SGR mouse: use alt as meta key instead of super/windows key
b1d97fec — Hiltjo Posthuma 1 year, 18 days ago
LICENSE: bump year
Fix mousereport

This patch replaces the previous one I sent.

The following changes are made in this patch:
 - Fix tracking of pressed buttons. Previously, pressing two buttons and
   then releasing one would make st think no buttons are pressed, which
   in particular broke MODE_MOUSEMOTION.
 - Always send the lowest-numbered pressed button on motion events; when
   no button is pressed for a motion event in MODE_MOUSEMANY, then send
   a release. This matches the behaviour of xterm. (Previously, st sent
   the most recently pressed button in the motion report.)
 - Remove UB (?) access to potentially inactive struct member
   e->xbutton.button of XEvent union.
 - Fix (unlikely) possibility of overflow for large button numbers.

The one discrepancy I found between st and xterm is that xterm sometimes
encodes buttons with large numbers (>5) strangely. E.g., xterm reports
presses of buttons 8 and 9 as releases, whereas st properly (?) encodes
them as presses.
config{.def,}.h: Correct background color

Signed-off-by: Страхиња Радић <contact@strahinja.org>
config{.def,}.h: Update after merge

Signed-off-by: Страхиња Радић <contact@strahinja.org>