feacb449 — Louis Solofrizzo 4 months ago master
st: Add better link delimiters and open link from selection rather than clipboard

Signed-off-by: Louis Solofrizzo <lsolofrizzo@online.net>
fb964ed6 — Louis Solofrizzo 5 months ago
st: Add open-url patch

Signed-off-by: Louis Solofrizzo <lsolofrizzo@online.net>
2a99c26c — Louis Solofrizzo 5 months ago
st: Add mouse and scrolling patches

Signed-off-by: Louis Solofrizzo <lsolofrizzo@online.net>
b66b9c32 — Louis Solofrizzo 5 months ago
config: Add my fonts and my color theme

Signed-off-by: Louis Solofrizzo <lsolofrizzo@online.net>
895e5b50 — Ivan Tham 5 months ago
Increase XmbLookupString buffer

Current buffer is too short to input medium to long sentences from IME.
Input with longer text will show the wrong input, taking 64 instead of
32 bytes should be enough for most of the cases. Broken cases before,

Chinese (taken from song 也可以)
可不可以轻轻的松开自己

Japanese (taken from bootleggers rom quote)
あなたは家のように感じる
38483011 — Hiltjo Posthuma 7 months ago
update FAQ

- add common question about the w3m image drawing hack.
- remove some bad advise about $TERM.
- change some links to https.
289c52b7 — Hiltjo Posthuma 8 months ago
CSIEscape, STREscape: use size_t for buffer length
7ceb3d1f — Avi Halachmi (:avih) 8 months ago
STREscape: don't trim prematurely

STRescape holds strings in escape sequences such as OSC and DCS, and
its buffer is 512 bytes.

If the input is too big then trailing chars are ignored, but the test
was off-by-1 such that it took 510 chars instead of 511 (before a
terminating NULL is added).

Now the full size can be utilized.
ea4d933e — Avi Halachmi (:avih) 8 months ago
base64dec: don't read out of bounds

Previously, base64dec checked terminating input '\0' every 4 calls to
base64dec_getc, where the latter progressed one or more chars on each
call, and could read past '\0' in the way it was used.

The input to base64dec currently comes only from OSC 52 escape seq
(copy to clipboard), and reading past '\0' or even past the buffer
boundary was easy to trigger.

Also, even if we could trust external input to be valid base64, there
are different base64 standards, and not all of them require padding
to 4 bytes blocks (using trailing '=' chars).

It didn't affect short OSC 52 strings because the buffer is initialized
to 0's, so typically it did stop within the buffer, but if the string
was trimmed to fit (the buffer is 512 bytes) then it did also read past
the end of the buffer, and the decoded suffix ended up arbitrary.

This patch makes base64dec_getc not progress past '\0', and instead
produce fake trailing padding of '='.

Additionally, at base64dec, if padding is detected at the first or
second byte of a quartet, then we identify it as invalid and abort
(a valid quartet has at least two leading non-padding bytes).
2e54a21b — Avi Halachmi (:avih) 8 months ago
OSC 52 - copy to clipboard: don't limit to 382 bytes

Strings which an application sends to the terminal in OSC, DCS, etc
are typically small (title, colors, etc) but one exception is OSC 52
which copies text to the clipboard, and is used for instance by tmux.

Previously st cropped these strings at 512 bytes, which for OSC 52
limited the copied text to 382 bytes (remaining buffer space before
base64). This made it less useful than it can be.

Now it's a dynamic growing buffer. It remains allocated after use,
resets to 512 when a new string starts, or leaked on exit.

Resetting/deallocating the buffer right after use (at strhandle) is
possible with some more code, however, it doesn't always end up used,
and to cover those cases too will require even more code, so resetting
only on new string is good enough for now.
83866428 — Sebastian J. Bronner 8 months ago
Fix tmux terminfo extensions Se and Ss

The tmux terminfo extensions Ss and Se are currently specified as
booleans in `st.info`. They should be strings. See
https://github.com/tmux/tmux/blob/eeedb43ae847a0a692ceea965f7556e84bca4fd0/tty-term.c
lines 254 and 265.

I have used the values from
https://invisible-island.net/ncurses/terminfo.src.html#toc-_S_I_M_P_L_E_T_E_R_M
for this patch.
1f09f0b0 — Ingo Lohmar 1 year, 1 month ago
apply hints before initial mapping (ICCCM)

For WM_CLASS this is mentioned in the ICCCM docs
https://tronche.com/gui/x/icccm/sec-4.html#s-4.1.2.5
(third sentence).

When changing the WM_CLASS from the command line, this is necessary for
window managers to pick it up before applying class-based rules.
a2c479c4 — Avi Halachmi (:avih) 8 months ago
mouse shortcuts: allow using forcemousemod (e.g. shift)

The recent mouse shurtcuts commits allow customization, but ignore
forcemousemod mask (default: shift) as a modifier, for no good reason
other than following the behavior of the KB shortcuts.

Allow using forcemousemod too, which now can be used to invoke
different shortcuts, though the automatic effect of forcemousemod will
be lost for buttons which use mask with forcemousemod.

E.g. the default is:

static uint forcemousemod = ShiftMask;
...
{ XK_ANY_MOD,           Button4, ttysend,        {.s = "\031"} },
...

where ttysend will be invoked for button4 with any mod when not in mouse
mode, and with shift when in mouse mode.

Now it's possible to do this:
{ ShiftMask,            Button4, ttysend,        {.s = "foo"} },
{ XK_ANY_MOD,           Button4, ttysend,        {.s = "\031"} },

Which will invoke ttysend("foo") while shift is held and ttysend("\031")
otherwise. Shift still overrides mouse mode, but will now send "foo".

Previously with this setup the second binding was always invoked
because the forceousemod mask was always removed from the event.

Buttons which don't use forcemousemod behave the same as before.

This is useful e.g. for the scrollback mouse patch, which wants to
configure shift+wheel for scrollback, while keeping the normal behavior
without shift.
ba7f4d69 — Avi Halachmi (:avih) 8 months ago
mouse shortcuts: allow same functions as kb shortcuts

Previously mouse shortcuts supported only ttywrite.

This required adding an "Arg" function ttysend - which does what the
original mouse shortcuts did.
d2b75db8 — Avi Halachmi (:avih) 8 months ago
mouse shortcuts: don't hardcode selpaste

Because selpaste is activated on release, a release flag was added to
mouse shortcuts which controls whether activation is on press/release,
and selpaste binding to button2 was moved to config.h .

button1 remains the only hardcoded mouse button - for selection + copy.
b6d280de — Avi Halachmi (:avih) 8 months ago
mouse shortcuts: allow override for all shortcuts

Allow forceselmod to override all mouse shortcuts rather than only
selection, and rename it to forcemousemod as it's now more appropriate.

This will affect mouse shortcuts which use mask other than XK_ANY_MOD.

This does not affect the default behavior because the default mouse
shortcuts (wheel) use XK_ANY_MOD, where forceselmod already activated
the override also before this change.

Previously, if a mouse shortcut was configured with a specific mod and
forceselmod was held, then the shortcut did not execute unless the
configured mod included forceselmod.
2b8333f5 — Hiltjo Posthuma 10 months ago
config.def.h: remove crlf value section

this is not used anymore.

patch sent as an ed script using RFC2549 by k0ga.
caa1d8fb — Hiltjo Posthuma 1 year, 1 month ago
FAQ: add entry about color emoji Xft bug

This has been asked many times on IRC and the mailinglist. Make it easier to
find information about this particular Xft issue by adding it to the FAQ.
f1546cf9 — Avi Halachmi (:avih) 1 year, 2 months ago
selection: fix view to match actual selection on first cell
21367a04 — Hiltjo Posthuma 1 year, 3 months ago
revert part of commit add0211522737b79dad990ccd65c8af63b5cc1dd

"use iswspace()/iswpunct() to find word delimiters

    this inverts the configuration logic: you no longer provide a list of
    delimiters -- all space and punctuation characters are considered
    delimiters, unless listed in extrawordchars."

Feedback from IRC and personal preference.
Next