Commit graph

22 commits

Author SHA1 Message Date
956ac898e2 Add gruvbox both themes 2022-11-19 22:28:06 +04:00
Hiltjo Posthuma
2abf0b58e1 fix buffer overflow when handling long composed input
To reproduce the issue:

"
If you already have the multi-key enabled on your system, then add this line
to your ~/.XCompose file:

[...]
<question> <T> <E> <S> <T> <question> :
"1234567890123456789012345678901234567890123456789012345678901234567890"
"

Reported by and an initial patch by Andy Gozas <andy@gozas.me>, thanks!

Adapted the patch, for now st (like dmenu) handles a fixed amount of composed
characters, or otherwise ignores it. This is done for simplicity sake.
2022-11-19 00:39:33 +04:00
Zacchary Dempsey-Plante
cfc3defa56 make underlines and strikethroughs respect chscale 2022-08-28 12:29:39 +04:00
Hiltjo Posthuma
13a9d8245f X10/SGR mouse: use alt as meta key instead of super/windows key 2022-08-28 12:05:33 +04:00
robert
0ca03d1c63 Fix mouse report with my additions
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.
2022-08-28 12:02:54 +04:00
Hiltjo Posthuma
43f01f3afe fix possible rare crash when Xutf8TextPropertyToTextList fails
from the XmbTextListToTextProperty(3) man page:

"If insufficient memory is available for the new value string, the functions
return XNoMemory.  If the current locale is not supported, the functions return
XLocaleNotSupported.  In both of these error cases, the functions do not set
text_prop_return."

Reported by Steffen Nurpmeso <steffen@sdaoden.eu>, thanks!
2022-04-30 13:31:36 +04:00
Petar Kapriš
302f26f48c Add 14th bit to XK_SWITCH_MOD bitmask
The bits of uint signal in an XKeyEvent which concern the key group (keyboard
layout) are bits 13 and 14, as documented here:
https://www.x.org/releases/X11R7.7/doc/libX11/XKB/xkblib.html#Groups_and_Shift_Levels
In the older version, only bit 13 was marked as part of XK_SWITCH_MOD, this
causes issues for users who have more than two keymaps. the 14th bit is not
in ignoremod, key sequences are not caught by match(), if they switch to a third
or fourth keyboard.
2022-04-30 13:31:17 +04:00
Hiltjo Posthuma
5cbf4c6cf9 fix: correctly encode mouse buttons >= 8 in X10 and SGR mode
These are typically mapped in X11 to the side-buttons (backward/forwards) on
the mouse. A comparison of the button numbers in SGR mode (first field):

st old:
0 1 2 64 65 66 67 68 69 70

st new (it is the same as xterm now):
0 1 2 64 65 66 67 128 129 130

A script to test and reproduce it, first argument is "h" (on) or "l" (off):

	#!/bin/sh
	printf '\x1b[?1000%s\x1b[?1006%s' "$1" "$1"

	for n in 1 2 3 4 5 6 7 8 9 10; do
		printf 'button %d\n' "$n"
		xdotool click "$n"
		printf '\n\n'
	done
2022-04-30 13:10:36 +04:00
John Collis
b4d8079a0d ST: Add WM_ICON_NAME property support
Also added _NET_WM_ICON_NAME.
2022-04-30 13:10:15 +04:00
5186382594 Gruvbox theme 2021-08-01 09:43:35 +03:00
5d0740bd6b Change the main font to Liberation Mono, add st-font2 spare fonts 2021-07-02 21:43:45 +03:00
97456b3325 Add to rightclickpaste Button2 as well 2021-01-23 01:35:42 +03:00
fe24022e12 Apply st-externalpipe-0.8.4.diff, rightclickpaste 2020-12-20 01:30:22 +03:00
06aff77336 Merge branch 'st-alpha-0.8.2' 2020-12-19 23:13:44 +03:00
513092f96e Apply alpha for 0.8.4 2020-12-19 20:32:56 +03:00
65abcc10b4 mkeys[] and shortcuts[] fixes for 0.8.4 2020-12-19 20:17:35 +03:00
96aeb2dad0 Merge 0.8.4 2020-12-19 03:27:43 +03:00
0d955b412c Right-click also paste from the selection 2019-12-04 15:20:08 +03:00
b2ecb752dc Re-applying alpha patch 2019-12-03 13:23:14 +03:00
b8432758a7 Apply st-solarized-dark-20180411-041912a.diff 2019-12-03 12:17:16 +03:00
6afcb9a7e3 Add font2 and alpha patches 2019-12-02 20:02:40 +03:00
7cefcaad8f Initial (st-0.8.2 with solarized and scrollback diff's) 2019-12-02 14:38:37 +03:00