Commit graph

2604 commits

Author SHA1 Message Date
Daniel Eklöf
fdb1f64cae
readme: remove stray ’;9~’ sequence 2020-08-27 21:08:24 +02:00
Daniel Eklöf
df35b09142
main: usage: footrc -> foot.ini 2020-08-27 20:03:30 +02:00
Daniel Eklöf
3309d8d779
changelog: new configuration file location 2020-08-27 20:02:43 +02:00
Daniel Eklöf
5c4af880fc
doc: rename footrc.5 to foot.ini.5, and update references 2020-08-27 20:02:30 +02:00
Daniel Eklöf
f7c2940880
readme: update references to the configuration file 2020-08-27 19:53:31 +02:00
Daniel Eklöf
865127d836
footrc: move to foot.ini 2020-08-27 19:53:31 +02:00
Daniel Eklöf
6dbd87016f
config: prefer loading configuration from $XDG_CONFIG_HOME/foot/foot.ini 2020-08-27 19:53:31 +02:00
Daniel Eklöf
32e2173b5d
Merge branch 'scrollback-indicator-positioning' into master
Closes #108
2020-08-27 19:52:47 +02:00
Daniel Eklöf
0e89302da2
Merge branch 'block-input-events-while-pasting' into master
Closes #101
2020-08-27 19:51:37 +02:00
Daniel Eklöf
c8d0dc5750
render: scrollback indicator: only leave room for search box when necessary 2020-08-26 19:12:12 +02:00
Daniel Eklöf
1109865c8e
render: scrollback indicator: subtract visible rows from populated rows
This prevents the indicator from starting too high up when the number
of used scrollback rows is low.
2020-08-26 19:10:00 +02:00
Daniel Eklöf
32639e442f
Merge branch 'xcalloc-fix' into master 2020-08-26 18:56:12 +02:00
Craig Barnes
fe9eaf3aaf xmalloc: fix edge case handling in xcalloc() function 2020-08-25 20:49:24 +01:00
Daniel Eklöf
139f59c27d
Merge branch 'type-limit-fixes' into master 2020-08-25 20:49:29 +02:00
Craig Barnes
f3acfea815 fix some buggy comparisons relating to signed/unsigned types 2020-08-25 19:39:17 +01:00
Daniel Eklöf
1707db1678
selection: don't initiate a paste when we're already pasting 2020-08-25 18:56:15 +02:00
Daniel Eklöf
9ec4c3fd94
selection: must use term_paste_data_to_slave() for paste data 2020-08-25 18:56:15 +02:00
Daniel Eklöf
91a839bf8e
term: enqueue data: cleanup 2020-08-25 18:56:15 +02:00
Daniel Eklöf
efbc3431ed
selection: clipboard callback: assert we're in sending-paste-data mode 2020-08-25 18:56:15 +02:00
Daniel Eklöf
2762e044aa
changelog: fixed input events from getting mixed with paste data 2020-08-25 18:56:15 +02:00
Daniel Eklöf
e570146c07
selection: block non-paste data from being sent to client while pasting
While pasting data from the clipboard, block *all* other data from
being sent to the client. This includes keyboard and mouse events, but
also replies for VT queries.

This is particularly important when bracketed paste has been enabled,
since then the client will interpret *everything* between the
bracketed paste start and end as paste data.
2020-08-25 18:56:15 +02:00
Daniel Eklöf
81222dac57
selection: add a 2 second timeout when receiving clipboard data
When reading clipboard data, a malicious clipboard provider could
stall us forever, by not sending any data, and not closing the pipe.

This commit adds a timer_fd based timeout of 2 seconds. If the timer
triggers, we abort the clipboard receive.
2020-08-25 18:56:13 +02:00
Daniel Eklöf
777a2eac51
Merge branch 'pedantic' into master 2020-08-25 18:54:21 +02:00
Daniel Eklöf
8fb7347150
meson/pkgbuild: bump tllist requirement to 1.0.4
This is the first version of tllist that compiles with '-pedantic'.
2020-08-25 18:52:44 +02:00
Daniel Eklöf
cc24c5f2e0
render: scrollback position: only count _used_ scrollback lines
When calculating where in the scrollback history we are, we previously
did this against the total number of scrollback lines. I.e. the
`scrollback.lines` setting in `footrc`.

Now, we count only the used/allocated scrollback lines.

Note that the initial indicator position might still seem to start a
bit high up, if the number of used scrollback lines is low. This is
because we use the *top* of the screen for the current position. Thus,
we'll never be at the bottom (except for the special case when
we're *really* at the bottom).
2020-08-25 18:45:04 +02:00
Daniel Eklöf
a2257cb082
Merge branch 'message-fix' into master 2020-08-23 19:18:27 +02:00
Jonas 'cherti' Große Sundrup
b27e237192
synchronize config-error-message with available field values 2020-08-23 18:50:11 +02:00
Daniel Eklöf
a5e9ea7c28
meson: build with -pedantic 2020-08-23 10:07:09 +02:00
Daniel Eklöf
74cf8e0206
selection: don't do "return function_returning_void()" in functions returning void 2020-08-23 10:07:09 +02:00
Daniel Eklöf
9db78c3122
vt: hide pedantic warnings around the VT state machine's switch cases
The switch statements use the GCC extension "case X ... Y", and here
it doesn't really make any sense to convert it to "case X: case Y:",
so hide the warnings instead.
2020-08-23 10:07:08 +02:00
Daniel Eklöf
aa3985a298
Don't use "case X ... Y:", if possible/where it makes sense 2020-08-23 10:07:08 +02:00
Daniel Eklöf
e32c0d9bf6
Cast printf formatter %p arguments to void* 2020-08-23 10:07:08 +02:00
Daniel Eklöf
c779a5ec7d
log: include 'fmt' in __VA_ARGS__
This ensures all calls have at least one __VA_ARGS__ argument, thus
making them ISO C99 compliant.
2020-08-23 10:07:08 +02:00
Daniel Eklöf
dabdffafa5
don't use empty struct initializers 2020-08-23 10:07:00 +02:00
Daniel Eklöf
ddef95c297
config: add user-configured search-binding to the correct binding list
Search bindings were added to the normal key binding list...
2020-08-23 09:55:19 +02:00
Daniel Eklöf
ef7429d44a
Merge branch 'colorterm' into master 2020-08-23 06:46:13 +02:00
Craig Barnes
26fccae03d slave: set $COLORTERM environment variable to "truecolor"
This is also done by libvte, alacritty, kitty and several other
terminal emulators as a way to indicate support for 24-bit RGB
colors. It generally also implies support for the xterm 256-color
palette and basic ECMA-48 colors.
2020-08-23 05:33:48 +01:00
Daniel Eklöf
75dc06f303
Merge branch 'timespec-compare-fix' into master 2020-08-23 06:08:38 +02:00
Daniel Eklöf
0788440061
Merge branch 'dont-send-mouse-events-to-client-when-binding-consumed-it' into master 2020-08-23 06:00:42 +02:00
Craig Barnes
0e7723e75f csi: avoid using memcmp() to compare timespec structs
This struct may contain padding bytes, whose values are indeterminate
after any store operation[1]. It may also contain unnamed members,
whose values are always indeterminate[2]. Using memcmp() isn't a
reliable way to compare structs where either of these may be present.

[1]: ISO/IEC 9899:1999 §6.2.6.1, paragraph 6
[2]: ISO/IEC 9899:1999 §6.7.8, paragraph 9

See also:

* https://wiki.sei.cmu.edu/confluence/display/c/EXP42-C.+Do+not+compare+padding+data
* https://sourceware.org/git/?p=glibc.git;a=blob;f=time/bits/types/struct_timespec.h;hb=756c306502498f9
2020-08-23 03:08:35 +01:00
Daniel Eklöf
3ddc17937f
input: inhibit mouse events to client when a binding has consumed it
This introduces a new state to a seat's mouse struct, 'consumed'. It
is set on a mouse *press* event that is claimed by a mouse binding.

It is cleared after a mouse *release* event.

While set, *no* mouse motion or button events are sent to the client
application.
2020-08-22 13:35:36 +02:00
Daniel Eklöf
82e197072b
config: don't pass -1 to mbstowcs(), silences linker(?) warning
'n' _is_ ignored when 'dest' is NULL, but you can still get the
following warning:

    In function ‘mbstowcs’,
        inlined from ‘parse_section_scrollback’ at ../config.c:429:26:
    /usr/include/bits/stdlib.h:129:10: warning: ‘__mbstowcs_alias’ specified size 18446744073709551612 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
      129 |   return __mbstowcs_alias (__dst, __src, __len);

To silence this warning, pass 0 instead, since it is ignored anyway.
2020-08-22 10:56:53 +02:00
Daniel Eklöf
11cb08f1b5
ci: sr.ht: run a codespell task at the end 2020-08-22 10:25:52 +02:00
Daniel Eklöf
7effd739b4
ci: gitlab: install pip 2020-08-22 10:20:21 +02:00
Daniel Eklöf
9971f3abb1
ci: gitlab: the package is called 'python3', not 'python' 2020-08-22 10:15:46 +02:00
Daniel Eklöf
f506eefe5e
ci: gitlab: pip install codespell
Alpine has no codespell package
2020-08-22 10:14:31 +02:00
Daniel Eklöf
9bedb98a0d
ci: gitlab: run codespell in the 'build' stage
This makes it run in parallel with the compilation steps
2020-08-22 10:14:10 +02:00
Daniel Eklöf
a41244a885
ci: gitlab: run a codespell stage on all *.c and *.h files 2020-08-22 10:11:20 +02:00
Daniel Eklöf
071cda1bd6
Merge branch 'dont-emit-newlines-when-copying-empty-cells' into master
Closes #97
2020-08-21 07:49:12 +02:00
Daniel Eklöf
f85cf47b65
extract: only emit newlines if followed by non-empty cells
Closes #97
2020-08-20 19:22:13 +02:00