Commit graph

2053 commits

Author SHA1 Message Date
Daniel Eklöf
c38b9be6a4
vt: utf8: don't need one entry action for each UTF8 variant 2020-05-31 12:41:07 +02:00
Daniel Eklöf
e4a6b12fda
readme: cleanup 2020-05-30 11:07:07 +02:00
Daniel Eklöf
b2733dd4b2
readme: GCC requires -Wno-missing-profile in a PGO build 2020-05-30 11:02:12 +02:00
Daniel Eklöf
b105ee5edd
readme: add link to "running the new build" at the end of the release build section 2020-05-30 10:52:26 +02:00
Daniel Eklöf
3def8efa10
readme: describe what should expect to see when running the benchmark 2020-05-30 10:51:04 +02:00
Daniel Eklöf
621dfa33cf
reaadme: add step to remove the temp file 2020-05-30 10:49:22 +02:00
Daniel Eklöf
7f173388ad
readme: add missing ')' 2020-05-30 10:48:12 +02:00
Daniel Eklöf
a9bcb8e988
readme: fix URL 2020-05-30 10:47:45 +02:00
Daniel Eklöf
1ba8de9cee
readme: describe how to do a PGO build 2020-05-30 10:46:22 +02:00
Daniel Eklöf
8fd7c837f7
render: resize: don't try to signal TIOCSWINSZ on a closed ptmx FD 2020-05-27 18:23:35 +02:00
Daniel Eklöf
5639082113
Merge branch 'hold-option-in-footclient'
This adds --hold to footclient. It was an oversight on my part to not
add it from the beginning, when it was added to foot.

Closes #17
2020-05-27 07:18:39 +02:00
Daniel Eklöf
e02121ae24
changelog: mention addition of '--hold' to footclient 2020-05-26 20:12:53 +02:00
Daniel Eklöf
aa5e84727b
doc: footclient: add --hold 2020-05-26 20:12:44 +02:00
Daniel Eklöf
fbfbcc453c
completions: zsh: footclient: add --hold 2020-05-26 20:12:35 +02:00
Daniel Eklöf
3943cad7ed
client/server: implement '--hold' in footclient 2020-05-26 20:11:38 +02:00
Daniel Eklöf
e310487dae
slave: set IUTF8 2020-05-26 18:18:11 +02:00
Daniel Eklöf
ae27a92153
readme: mention that -O3 is default in release builds 2020-05-25 21:24:00 +02:00
Daniel Eklöf
2541060ae4
readme: document work around for GCC 10.1 O2+PGO regression 2020-05-25 21:21:49 +02:00
Daniel Eklöf
a324004fdb
meson: don't set -Wno-missing-profile
We don't do PGO by default
2020-05-25 21:15:17 +02:00
Daniel Eklöf
4699ed343a
PKGBUILD: always set -fno-plt and -Wno-missing-profile 2020-05-25 21:14:52 +02:00
Daniel Eklöf
55f244601f
PKGBUILD: append -O3 to makepkg provided CFLAGS
This works around a GCC 10.1 O2+PGO regression.
2020-05-25 21:01:55 +02:00
Daniel Eklöf
62b0546c22
readme: compared with -> compared to 2020-05-25 20:19:19 +02:00
Daniel Eklöf
8bf8a12362
meson: -fprofile-correction is automatically added by meson 2020-05-25 19:42:47 +02:00
Daniel Eklöf
12d495dd41
readme: spelling: gpo -> pgo 2020-05-25 19:36:27 +02:00
Daniel Eklöf
1a53589913
terminfo: put 'cvvis' on a separate line 2020-05-25 19:35:37 +02:00
Daniel Eklöf
b5b1c19e94
readme: mention GCC 10.1 performance regression 2020-05-25 19:35:17 +02:00
Daniel Eklöf
29ac0278b1
changelog: is -> are 2020-05-21 20:28:26 +02:00
Daniel Eklöf
89dd31bfd7
reaper: disable debug logging 2020-05-21 20:27:42 +02:00
Daniel Eklöf
c605503df6
slave: restore signal mask 2020-05-21 20:22:24 +02:00
Daniel Eklöf
789617d5ad
term: don't double fork new terminal windows
Instead, register their PIDs with the new reaper module and let it
handle them.
2020-05-21 20:17:29 +02:00
Daniel Eklöf
f49742ebba
reaper: new module, uses a signalfd to wait() on child processes
Use a signalfd to listen for SIGCHLD signals.

When we receive a SIGCHLD over the signalfd, reap all dead children by
looping over all registered child PIDs and call waitpid(WNOHANG) on
them.
2020-05-21 20:15:10 +02:00
Daniel Eklöf
5600cc68c0
readme: mention that gcc produces a much faster binary than clang 2020-05-21 18:05:38 +02:00
Daniel Eklöf
98fde56c51
meson: add -fprofile-correction 2020-05-21 18:01:53 +02:00
Daniel Eklöf
483ea4ae73
scrolling: fix crash when offset was exactly at the wrap-around
When making sure we don't scroll past the scrollback history, and the
current offset was exactly at the wrap around, the new view port was
set to offset+1, which in this particular case meant outside the valid
row numbers.
2020-05-19 18:51:56 +02:00
Daniel Eklöf
8ad3b9c172
selection: performance: check for < 0 or >= 0 instead of == -1 2020-05-19 18:51:30 +02:00
Daniel Eklöf
08588cd0fc
selection: handle viewport wrap around correctly
When the viewport wraps around, the selection points may be
"incorrect".
2020-05-19 18:49:42 +02:00
Daniel Eklöf
550667a9ea
term: scrolling: calling function must clamp scroll amount 2020-05-19 18:47:38 +02:00
Daniel Eklöf
dea36de7e3
readme: add suggested cflags for a release build 2020-05-18 19:01:22 +02:00
Daniel Eklöf
33346ba02d
term: erase_cell_range: set row->dirty before calling memset() 2020-05-17 16:29:09 +02:00
Daniel Eklöf
52e6a751b3
term: scrolling: mark selection top if-statement as 'unlikely' 2020-05-17 15:48:58 +02:00
Daniel Eklöf
96a4f1b993
term: scrolling: hopefully fix all selection/scrolling related crashes
When scrolling, there are a couple of cases where an existing
selection must be canceled because we cannot meaningfully represent it
after scrolling.

These are when the selection is (partly) inside:

* The top scrolling region
* The bottom scrolling region
* The new lines scrolled in. I.e. re-used lines

For the scrolling regions, the real problem is when the selection
crosses the scrolling region boundary; a selection that is completely
inside a scrolling regions _might_ be possible to keep, but we would
need to translate the selection coordinates to the new scrolling
region lines.

For simplicity, we cancel the selection if it touches the scrolling
region. Period.

The last item, newly scrolled in lines is when the selection covers
very old lines and we're now wrapping around the scrollback history.

Then there's a fourth problem case: when the user has started a
selection, but hasn't yet moved the cursor. In this case, we have no
end point.

What's more problematic is that when the user (after scrolling) moves
the cursor, we try to create a huge selection that covers mostly
empty (NULL) rows, causing us to crash.

This can happen e.g. when reverse scrolling in such a way that we wrap
around the scrollback history.

The actual viewport in this case is something like `-n - m`. But the
selection we'll end up trying to create will be `m - (rows - n)`. This
range may very well contain NULL rows.

To deal with this, we simply cancel the selection.
2020-05-17 15:34:49 +02:00
Daniel Eklöf
5d643e63fe
selection: on_rows_in_view: fix range check 2020-05-17 12:04:08 +02:00
Daniel Eklöf
8f9e6127da
term: scrolling: sixel: simplify now that row count is clamped 2020-05-17 11:46:44 +02:00
Daniel Eklöf
cfd0b5d2d8
term: scrolling: in debug builds, verify all rows are allocated 2020-05-16 23:53:23 +02:00
Daniel Eklöf
ebd867372a
term: scrolling: simplify, now that scroll row count is clamped 2020-05-16 23:53:03 +02:00
Daniel Eklöf
a4f5938123
term: scrolling: clamp number of rows to number of rows in scrolling region 2020-05-16 23:44:54 +02:00
Daniel Eklöf
57e04a1320
grid: swap_row: remove unused parameter 'initialize' 2020-05-16 23:43:05 +02:00
Daniel Eklöf
6902c22a77
selection: copy: insert line break if either cell is empty 2020-05-16 22:29:53 +02:00
Daniel Eklöf
1a8ccb0ffa
selection/render: sync cells' 'selected' bit before rendering
For performance reasons, we track whether a cell is selected or not
using a bit in a cell's attributes.

This makes it easy for the renderer to determine if the cells should
be rendered as selected or not - it just have to look at the
'selected' bit instead of doing a complex range check against the
current selection.

This works nicely in most cases. But, if the cell is updated, the
'selected' bit is cleared. This results in the renderer rendering the
cell normally, i.e. _not_ selected.

Checking for this, and re-setting the 'selected' bit when the cell is
updated (printed to) is way too expensive as it is in the hot path.

Instead, sync the 'selected' bits just before rendering. This isn't so
bad as it may sound; if there is no selection this is a no-op. Even if
there is a selection, only those cells whose 'selected' bit have been
cleared are dirtied (and thus re-rendered) - these cells would have
been re-rendered anyway.
2020-05-16 21:36:08 +02:00
Daniel Eklöf
a1c95562fb
term: scrolling: clear selection *before* scrolling
We normally don't clear the selection when scrolling. The exception is
when the selection covers re-used rows. I.e. rows that we scroll in
and clear.

In this case we cancel the selection (we _could_ modify it and keep as
much as possible and only remove the re-used rows...). We must do
this *before* scrolling, since scrolling will swap rows (when there's
a scrolling region). When this happens, the selection is "corrupted",
and canceling it afterwards will not work.
2020-05-16 21:27:56 +02:00