Commit Graph

75 Commits

Author SHA1 Message Date
Bakkeby
f0bad9ac44 Removing the anysize-nobar amendment for the anysize patch as this should be redundant following the fix in PR #75 2022-07-18 11:54:51 +02:00
Bakkeby
dc8abceeca Makefile: add manual path for OpenBSD
ref. https://git.suckless.org/st/commit/baa9357e96d2478baa52a3301e70ac80a229b726.html
2022-07-10 17:11:39 +02:00
myNameIsPK
bca5e344fa
Fix typo 2022-06-04 04:51:57 +07:00
bakkeby
3e41e252b1 Adding background image reload patch ref. pull request #62 2022-04-11 16:04:58 +02:00
bakkeby
d8ec7a396c 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.

ref. https://git.suckless.org/st/commit/ef0551932fb162f907b40185d2f48c3b497708ee.html
2022-03-28 11:23:52 +02:00
bakkeby
fb0b76b0ff make underlines and strikethroughs respect chscale
Ref.
https://git.suckless.org/st/commit/2aefa348baf4b702fdce98eb105bcba175d8283f.html
2022-03-14 09:45:12 +01:00
bakkeby
1a8175a337 Adding background image patch 2022-03-10 13:54:28 +01:00
bakkeby
4a156b95f9 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.

Ref.
   - https://git.suckless.org/st/commit/e823e2308f2a99023032a3966ebb7036a31d305f.html
2022-02-24 13:46:37 +01:00
bakkeby
c02ad97409 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!

Ref. https://git.suckless.org/st/commit/2f6e597ed871cff91c627850d03152cae5f45779.html
2021-08-24 15:02:20 +02:00
bakkeby
271a807111 Adding the CSI 22, 23 patch 2021-08-18 10:07:42 +02:00
bakkeby
eccd7fac9e Adding columns patch ref. #34 2021-07-26 10:16:54 +02:00
bakkeby
286db8098b 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.
2021-07-18 18:17:17 +02:00
bakkeby
ee4cdc8d6e Adding openurlonclick patch ref. #32 2021-07-07 10:08:43 +02:00
bakkeby
b0660ecf47 Adding hide terminal cursor patch 2021-06-09 09:54:50 +02:00
bakkeby
ad7e16b38a Adding swapmouse patch ref. #28 2021-05-16 11:40:15 +02:00
bakkeby
5adf4c4c8e Adding default cursor patch 2021-05-11 16:35:30 +02:00
bakkeby
78e025a0e7 Upgrading to latest master, 46b02f, 2021-03-28 2021-05-10 10:43:48 +02:00
bakkeby
896f5a08c8 Upgrading to latest master, 46b02f, 2021-03-28 2021-05-10 09:39:02 +02:00
bakkeby
e039854635 Adding vim browse patch ref. #21 2021-05-09 17:48:28 +02:00
bakkeby
1a1d492cd8 Adding alpha-focus-highlight patch 2021-05-09 14:40:30 +02:00
bakkeby
56e208e0de Adding sync patch ref. #21 2021-05-09 09:25:22 +02:00
bakkeby
a5435903d4 Adding universcroll patch ref. #21 2021-05-08 17:49:04 +02:00
bakkeby
a1303a8811 Adding delkey patch ref. #21 2021-05-08 16:57:59 +02:00
bakkeby
a44ac5937f Adding osc_10_11_12_2 patch ref. #21 2021-05-08 16:50:06 +02:00
bakkeby
8c8bace91c Adding netwmicon patch ref. #21 2021-05-08 14:50:06 +02:00
bakkeby
79278e3d32 Adding undercurl patch ref. #20 2021-05-08 10:53:46 +02:00
bakkeby
ce05a34de1 Adding blinking cursor patch ref. #20 2021-05-08 10:13:20 +02:00
bakkeby
0fade9158a xresources reload: minor style changes ref. #16 2021-05-07 09:27:05 +02:00
bakkeby
08f137a8a0 Adding workaround for Variable Fonts causing too wide letter spacing 2021-04-21 15:54:41 +02:00
bakkeby
f31c43015d Adding sixel support ref. #7 2021-03-25 11:10:57 +01:00
bakkeby
884c62a056 Adding dynamic cursor color patch ref. #10 2021-02-26 14:33:03 +01:00
bakkeby
99903c67d9 Adding alpha gradient patch 2021-02-15 14:37:37 +01:00
bakkeby
a23971fff1 Adding wide glyphs patch 2020-11-14 16:24:07 +01:00
bakkeby
ef994f3e6d Adding monochrome patch and anysize-nobar patch 2020-10-23 10:14:00 +02:00
bakkeby
315c5cbe9f Re-added visualbell patch 2020-08-09 18:09:43 +02:00
bakkeby
c8d69b5d70 Added the single drawable buffer patch as per the FAQ in order to get w3m images to display 2020-06-26 15:01:30 +02:00
bakkeby
93aac7e1a3 bump version to 0.8.4 2020-06-25 12:43:25 +02:00
bakkeby
bca86276e7 Adding w3m patch 2020-06-14 20:04:27 +02:00
bakkeby
2c85b5da91 FAQ: fix single-buffer patch (249ef9)
rebase against master
2020-06-10 21:02:22 +02:00
bakkeby
e0169edec9 Adding ligatures patch as requested in #4 2020-06-05 13:43:14 +02:00
bakkeby
ff5f26cc3b Upgrade to 3c8b75 2020-05-24 17:21:13 +02:00
bakkeby
c594597596 Upgrade to 222876 2020-05-20 15:04:43 +02:00
bakkeby
a095e46895 Revert "support REP (repeat) escape sequence"
This reverts commit e8392b282c.

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).
2020-05-20 15:00:46 +02:00
bakkeby
eb56c17d51 support REP (repeat) escape sequence
The sequence \e[Nb prints the last printed char N (more) times if it's
printable, and it's ignored after newline or other control chars.

This is Ecma-048/ANSI-X3.6 sequence and not DEC VT. It's supported by
xterm, and ncurses uses it when possible, e.g. when TERM is xterm* (and
with this commit also st*).

xterm supports only codepoints<=255, possibly due to internal limits.
We support any value/codepoint which was placed in a cell.

To test:
- tput rep 65 4 -> prints 'AAAA'
- printf "\342\225\246\033[4b" -> prints U+2566 1+4 times.
2020-05-20 14:59:43 +02:00
bakkeby
ee4f3ae97b Add rin terminfo capability
Tianlin Qu discovered that st is missing rin (scroll back #1 lines).
2020-05-20 14:40:38 +02:00
bakkeby
bda4877b5f Make shift+wheel behaves as shift+Prev/Next
St uses a very good hack where mouse wheel genereates ^Y and ^E,
that are the same keys that less and vi uses for backward and
fordward scrolling. Scroll, as many terminal emulators, use
shift+Prev/Next for scrolling, but it is also using ^E and ^Y
for scroling, characters that are reserved in the POSIX shell
in emacs mode for end of line and yanking, making scroll unsable
in st.

This patch adds a new hack, making shift+wheel returning the
same sequences than shift+Prev/Next, meaning that scroll or
any other similar program will not be able to differentiate
between them.
2020-05-20 14:39:35 +02:00
bakkeby
0ade2e6268 Fix selection: selscroll 2020-05-20 14:30:44 +02:00
bakkeby
e3a567ed79 Fix selection: ignore ATTR_WRAP when rectangular selection in getsel 2020-05-20 14:29:02 +02:00
bakkeby
18b2af6546 Fix selection: selclear in tputc 2020-05-20 14:26:56 +02:00
bakkeby
7a1259e112 code-style: add fallthrough comment
Patch by Steve Ward, thanks.
2020-05-20 14:26:04 +02:00