Commits
- Commit:
7fb0c0cc681f36be2ad12091ef93a41671f32738- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
bump version to 0.8.5
- Commit:
7e1c68f25d9f08687a94eeef8d7f8ffd0d14b911- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
FAQ: fix a typo, patch -> path
- Commit:
65f1dc428315ae9d7f362e10c668557c1379e7af- From:
- jamin <acdimalev@gmail.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Fix overtyping wide characters.
Overtyping the first half of a wide character with the
second half of a wide character results in display garbage.
This is because the trailing dummy is not cleaned up.
i.e. ATTR_WIDE, ATTR_WDUMMY, ATTR_WDUMMY
Here is a short script for demonstrating the behavior:
#!/bin/sh
alias printf=/usr/bin/printf
printf こんにちは!; sleep 2
printf '\x1b[5D'; sleep 2
printf へ; sleep 2
printf ' '; sleep 2
echo
- Commit:
a0467c802d4f86ed162486e3453dd61181423902- From:
- Jochen Sprickerhof <git@jochen.sprickerhof.de>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Fix null pointer access in strhandle
According to the spec the argument is optional for 104, so p can be
NULL as can be tested with printf '\x1b]104\x07'. This is a regression
of 8e31030.
- Commit:
273db5ceaf392e68c2faf8f7dec14ea2e25e980d- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
follow-up fix for OSC color sequences, return
Otherwise the message "erresc: unknown str" is printed.
- Commit:
8e310303903792c010d03c046ba75f8b18f7d3a7- From:
- Raheman Vaiya <r.vaiya@gmail.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Add support for OSC color sequences
- Commit:
2f6e597ed871cff91c627850d03152cae5f45779- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
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!
- Commit:
1d3142da968da7f6f61f1c1708f39ca233eda150- From:
- Koichi Murase <myoga.murase@gmail.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
fix a problem that the standard streams are unexpectedly closed
In the current implementation, the slave PTY (assigned to the variable
`s') is always closed after duplicating it to file descriptors of
standard streams (0, 1, and 2). However, when the allocated slave PTY
`s' is already one of 0, 1, or 2, this causes unexpected closing of a
standard stream. The same problem occurs when the file descriptor of
the master PTY (the variable `m') is one of 0, 1, or 2.
In this patch, the original master PTY (m) is closed before it would
be overwritten by duplicated slave PTYs. The original slave PTY (s)
is closed only when it is not one of the stanrad streams.
- Commit:
2ec571a30c0c3b1a17f6b3631c80d573582f59a1- From:
- Petar Kapriš <petarkapris@firemail.cc>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
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.
- Commit:
4536f46cfff50c66a115755def0155d8e246b02f- From:
- Markus F.X.J. Oberhumer <markus@oberhumer.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Mild const-correctness improvements.
Only touch a few things, the main focus is to
improve code readability.
- Commit:
9e68fdbcdb06dfa3d23fe3a7a7f7b59e40e1ea2f- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
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
- Commit:
4ef0cbd8b9371f37f7d02ef37b5378b879e6b8bf- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
remove unused variable from previous patch
- Commit:
28b4c822c5c0acec300fdf15c6e3ede9f5e2335d- From:
- John Collis <john.collis@alliedtelesis.co.nz>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
ST: Add WM_ICON_NAME property support
Also added _NET_WM_ICON_NAME.
- Commit:
fa253f077f19b3220c7655b81bd91e52f4367803- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
bump version to 0.8.4
- Commit:
b27a383a3acc7decf00e6e889fca265430b5d329- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
config.mk: use PKG_CONFIG in commented OpenBSD section
- Commit:
81067c65ea4dd80e8eb34755a4f50a4a8c7df06b- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
LICENSE: bump years
- Commit:
f74a9df6e1fc88eebe6d673d888b61fd83cf6fc4- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
remove sixel stub code
Remove stub code that was used for an experiment of adding sixel code to st
from the commit f7398434.
- Commit:
818ec746f4caae453d09368b101c3e841cf39870- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
fix unicode glitch in DCS strings, patch by Tim Allen
Reported on the mailinglist:
"
I discovered recently that if an application running inside st tries to
send a DCS string, subsequent Unicode characters get messed up. For
example, consider the following test-case:
printf '\303\277\033P\033\\\303\277'
...where:
- \303\277 is the UTF-8 encoding of U+00FF LATIN SMALL LETTER Y WITH
DIAERESIS (ÿ).
- \033P is ESC P, the token that begins a DCS string.
- \033\\ is ESC \, a token that ends a DCS string.
- \303\277 is the same ÿ character again.
If I run the above command in a VTE-based terminal, or xterm, or
QTerminal, or pterm (PuTTY), I get the output:
ÿÿ
...which is to say, the empty DCS string is ignored. However, if I run
that command inside st (as of commit 9ba7ecf), I get:
ÿÿ
...where those last two characters are \303\277 interpreted as ISO8859-1
characters, instead of UTF-8.
I spent some time tracing through the state machines in st.c, and so far
as I can tell, this is how it works currently:
- ESC P sets the "ESC_DCS" and "ESC_STR" flags, indicating that
incoming bytes should be collected into the strescseq buffer, rather
than being interpreted.
- ESC \ sets the "ESC_STR_END" flag (when ESC is received), and then
calls strhandle() (when \ is received) to interpret the collected
bytes.
- If the collected bytes begin with 'P' (i.e. if this was a DCS
string) strhandle() sets the "ESC_DCS" flag again, confusing the
state machine.
If my understanding is correct, fixing the problem should be as easy as
removing the line that sets ESC_DCS from strhandle():
diff --git a/st.c b/st.c
index ef8abd5..b5b805a 100644
--- a/st.c
+++ b/st.c
@@ -1897,7 +1897,6 @@ strhandle(void)
xsettitle(strescseq.args[0]);
return;
case 'P': /* DCS -- Device Control String */
- term.mode |= ESC_DCS;
case '_': /* APC -- Application Program Command */
case '^': /* PM -- Privacy Message */
return;
I've tried the above patch and it fixes my problem, but I don't know if
it introduces any others.
"
- Commit:
9ba7ecf7b15ec2986c6142036706aa353b249ef9- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
FAQ: fix single-buffer patch
rebase against master
- Commit:
a2a704492b9f4d2408d180f7aeeacf4c789a1d67- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
config.def.h: add an option allowwindowops, by default off (secure)
Similar to the xterm AllowWindowOps option, this is an option to allow or
disallow certain (non-interactive) operations that can be insecure or
exploited.
NOTE: xsettitle() is not guarded by this because st does not support printing
the window title. Else this could be exploitable (arbitrary code execution).
Similar problems have been found in the past in other terminal emulators.
The sequence for base64-encoded clipboard copy is now guarded because it allows
a sequence written to the terminal to manipulate the clipboard of the running
user non-interactively, for example:
printf '\x1b]52;0;ZWNobyBoaQ0=\a'
- Commit:
0f8b40652bca0670f1f0bda069bbc55f8b5e364d- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
FAQ: add some details about the w3m img hack
... and an example patch to switch from double-buffering to a single buffer.
- Commit:
e6e2c6199f102f1459b53717050eee27832f4f87- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
tiny style fix
- Commit:
94b8ec002101a5e8f52a342e53431eea71aa0631- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Partially add back in "support REP (repeat) escape sequence"
Add the functionality back in for xterm compatibility, but do not expose the
capability in st.info (yet).
Some notes:
It was reverted because it caused some issues with ncurses in some
configurations, namely when using BSD padding (--enable-bsdpad, BSD_TPUTS) in
ncurses it caused issues with repeating digits.
A fix has been upstreamed in ncurses since snapshot 20200523. The fix is also
backported to OpenBSD -current.
- Commit:
dec6b530a4fddf405c1822b2cac6e2036d3c8b75- From:
- Steve Ward <planet36@gmail.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Call xsetcursor to set win.cursor in main
In xsetcursor, remove "DEFAULT(cursor, 1)" because 0 is a valid value.
Increase max allowed value of cursor from 6 to 7 (st extension).
- Commit:
475a0a36cb4fda1da30f014da65988e99b222876- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Revert "support REP (repeat) escape sequence"
This reverts commit e8392b282c2eaa28725241a9612804fb55113da4.
There is currently a bug in older ncurses versions (like on OpenBSD) where a
fix for a bug with REP is not backported yet. Most likely in tty/tty_update.c:
Noticed while using lynx (which uses ncurses/curses).
To reproduce using lynx: echo "Z0000000" | lynx -stdin
or using the program:
int
main(void)
{
WINDOW *win;
win = initscr();
printw("Z0000000");
refresh();
sleep(5);
return 0;
}
This prints "ZZZZZZZ" (incorrectly).
