config.h: Revert normal red, bright red and bright blue to upstream
Signed-off-by: Страхиња Радић <sr@strahinja.org>
Reset title when an empty title string is given
With this patch, st will reset its window title when an empty string is
given as the terminal title. For example:
printf "\033]0;\007"
Some applications, like termdown, expect this functionality. xterm
implements it, but it seems that most other terminal emulators don't.
In any case, I don't see why there should ever be a case where the st
window doesn't have a title property.
Revert "Fix cursor move with wide glyphs"
This reverts commit 7473a8d1a57e5f9aba41b953f4e498c35e1c9dc5.
This patch needs some more work. It caused regressions with programs that use
GNU readline, etc.
Original test-case example from Tim Culverhouse <tim@timculverhouse.com>:
printf " 😀" && sleep 2 && printf "\e[D" && sleep 2 && printf "\e[D" && sleep 2
After the patch it caused regressions, example test-case:
printf "A字\bB\n"
st.c: Implement externalpipe-0.8.5 OpenBSD pledge fix
Signed-off-by: Страхиња Радић <contact@strahinja.org>
config.mk: Make OpenBSD main; applied/st-externalpipe-0.8.5.diff: Fix OpenBSD
pledge
Signed-off-by: Страхиња Радић <contact@strahinja.org>
config.def.h: improve latency for the default configuration
set upper limit for REP escape sequence argument
Previously, printf 'L\033[2147483647b' would call tputc('L') 2^31 times,
making st unresponsive. This commit allows repeating the last character
at most 65535 times in order to prevent freezing and DoS attacks.
Fix cursor move with wide glyphs
st would always move back 1 column,
even with wide glyhps (using more than a single column).
The glyph rune is set on its first column,
and the other ones are to 0,
so loop until we detect the start of the previous glyph.
csi: check for private marker in 'S' case
The handler for 'S' final character does not check for a private
marker. This can cause a conflict with a sequence called 'XTSMGRAPHICS'
which also has an 'S' final character, but uses the private marker '?'.
Without checking for a private marker, st will perform a scroll up
operation when XTSMGRAPHICS is seen, which can cause unexpected display
artifacts.
Add terminfo entries for bracketed paste mode
Helps Vim (and hopefully others) to discover that this feature exists
without further user configuration.
Unhide cursor on RIS (\033c)
It is unclear if it's "required" to do this on RIS, but it's useful when
calling reset(1) after interactive programs have crashed and garbled up
the screen.
FWIW, other terminals do it as well (tested with XTerm, VTE, Kitty,
Alacritty, Linux VT).