Commits
- Commit:
43a395ae91f7d67ce694e65edeaa7bbc720dd027- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
bump version to 0.8.3
- Commit:
72e3f6c7c05b4d5b56388508bb20a863aec279f5- From:
- Ivan Tham <pickfire@riseup.net>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Update XIM cursor position only if changed
Updating XIM cursor position is expensive, so only update it when cursor
position changed.
- Commit:
33a9a456644ceb235ea6ce61282f3bdce7a8b547- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
just remove the EOF message
- Commit:
771bc401f76b329f78a285ca65355d4b43415172- From:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Add st-mono terminfo entry
This entry is intended for monocolor display and it is very
helpful for color haters.
- Commit:
d66bd405c0d0f29beff89683a04a10297e962cb9- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
config.def.h: add a comment for the scroll variable
- Commit:
e997303502ddd5c26cfc41af0ff5356bffc04359- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Fix small typos
- Commit:
c1145268f6b6c6f03a8bec1c09d356d6a4eba77e- From:
- Quentin Rameau <quinq@fifth.space>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Launch scroll program with the default shell
- Commit:
0b73612c0dc51dbec1717e5da94bc94559c37246- From:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Update FAQ with the last modifications
- Commit:
019449a7e64a881be8cc5d715fe9de32726ba190- From:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Add terminfo entries for backspace mode
St used to use backspace as BS until the commit 230d0c8, but due
to general lack of knowledge of lusers, we moved to the most common
configuration in linux to avoid answering the same question 3 times
per month. With the most common configuration we have a backspace
that returns a DEL, and we have a Delete key that doesn't return a
DEL character neither a BS.
When dealing with devices connected using a serial line (or even
with Plan9) it is more common Backspace as BS and Delete as DEL. For
this reason, st is not always the best tool when you talk with a
serial device.
This patch adds new terminfo entries for Backspace as BS and Delete
as DEL. A patch for confg.h is also added, to make easier switch
between both configurations.
- Commit:
fbae700a3f32db76106b0ff6f49a73ecf0c2b4fe- From:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Fix style issue
- Commit:
e52319cc7d153e4f59b38c4fb4c0556e118d4775- From:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
ttyread: test for EOF while reading tty
When a read operation returns 0 then it means that we arrived to the end of the
file, and new reads will return 0 unless you do some other operation such as
lseek(). This case happens with USB-232 adapters when they are unplugged.
- Commit:
21e0d6e8b8d20903494386e7e6f43201b3761154- From:
- Roberto E. Vargas Caballero <k0ga@shike2.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Add support for scroll(1)
Scroll is a program that stores all the lines of its child and be used in st as
a way of implementing scrollback.
This solution is much better than implementing the scrollback in st itself
because having a different program allows to use it in any other program
without doing modifications to those programs.
- Commit:
5703aa0390484dd7da4bd9c388c85708d8fcd339- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
make argv0 not static, fixes a warning with tcc
Reported by Aajonus, thanks!
- Commit:
28ad28839985e965c9ca06a9a202523414c84ac4- From:
- Avi Halachmi (:avih) <avihpit@yahoo.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
mouseshortcuts: fix custom modifier on release
This line didn't work at mshortcuts at config.h:
/* mask button function arg release */
{ ShiftMask, Button2, selpaste, {.i = 0}, 1 },
and now it does work.
The issue was that XButtonEvent.state is "the logical state ... just prior
to the event", which means that on release the state has the Button2Mask
bit set because button2 was down just before it was released.
The issue didn't manifest with the default shift + middle-click on release
(to override mouse mode) because its specified modifier is XK_ANY_MOD, at
which case match(...) ignores any specific bits and simply returns true.
The issue also doesn't manifest on press, because prior to the event
Button<N> was not down and its mask bit is not set.
Fix by filtering out the mask of the button which we're currently matching.
We could have said "well, that's how button events behave, you should
use ShiftMask|Button2Mask for release", but this both not obvious to
figure out, and specifically here always filtering does not prevent
configuring any useful modifiers combination. So it's a win-win.
- Commit:
51e19ea11dd42eefed1ca136ee3f6be975f618b1- From:
- Ivan Tham <pickfire@riseup.net>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
Remove explicit XNFocusWindow
XCreateIC ICValues default XNFocusWindow to XNClientWindow if not
specified, it can be omitted since it is the same.
From the documentation
https://www.x.org/releases/current/doc/libX11/libX11/libX11.html
> Focus Window
>
> The XNFocusWindow argument specifies the focus window. The primary
> purpose of the XNFocusWindow is to identify the window that will receive
> the key event when input is composed.
>
> When this XIC value is left unspecified, the input method will use the
> client window as the default focus window.
- Commit:
26cdfebf31f024e331429e482b1ee342708888e3- From:
- Quentin Rameau <quinq@fifth.space>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
x: fix XIM handling
Do not try to set specific IM method, let the user specify it with
XMODIFIERS.
If the requested method is not available or opening fails, fallback to
the default input handler and register a handler on the new IM server
availability signal.
Do the same when the input server is closed and (re)started.
- Commit:
cd785755f2e3e3305c7d2556a04423a40bce060a- From:
- Quentin Rameau <quinq@fifth.space>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
x: check we still have an XIC context before accessing it
- Commit:
2cb539142b97bd2a5c1a322fd7c063c6afb67c9b- From:
- Quentin Rameau <quinq@fifth.space>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
x: do not instantiate a new nested list on each cursor move
- Commit:
99de33395126fc9708f442d155e737b9182f6ef4- From:
- Quentin Rameau <quinq@fifth.space>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
x: move IME variables into XWindow ime embedded struct
- Commit:
895e5b50a8cc835c19a45e1e328eb4dc78f5fd0c- From:
- Ivan Tham <pickfire@riseup.net>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
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)
あなたは家のように感じる
- Commit:
384830110bddcebed00b6530a5336f07ad7c405f- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
update FAQ
- add common question about the w3m image drawing hack.
- remove some bad advise about $TERM.
- change some links to https.
- Commit:
2e54a21b5ae249a6bcedab9db611ea86037a018b- From:
- Avi Halachmi (:avih) <avihpit@yahoo.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
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.
- Commit:
289c52b7aa9b0e826bbea6f956755b3199b3ccac- From:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
CSIEscape, STREscape: use size_t for buffer length
- Commit:
7ceb3d1f72eabfa678e5cfae176c57630ad98c43- From:
- Avi Halachmi (:avih) <avihpit@yahoo.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
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.
- Commit:
ea4d933ed9d8ce16699c84892a29e070c70b2eb9- From:
- Avi Halachmi (:avih) <avihpit@yahoo.com>
- Via:
- Hiltjo Posthuma <hiltjo@codemadness.org>
- Date:
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).
