Commit graph

3393 commits

Author SHA1 Message Date
Daniel Eklöf
3be80622ef
selection: uri decode: move zero-length check into decode_one_uri() 2021-01-12 14:56:47 +01:00
Daniel Eklöf
497b8e6c0a
changelog: add hyphen between ‘newline’ and ‘terminated’ 2021-01-12 14:55:21 +01:00
Daniel Eklöf
d968bcd506
changelog: pasting non-newline terminated text/uri-list offers 2021-01-12 14:48:20 +01:00
Daniel Eklöf
c8bcce83d5
selection: add a ‘finish’ function, called at the end of receiving clipboard data
This is necessary to decode the final URI in a text/uri-list offer if
it hasn’t been newline terminated.
2021-01-12 14:45:41 +01:00
Daniel Eklöf
e3e3ffc67c
selection: URI decoder: break out decoding of a single URI 2021-01-12 14:45:04 +01:00
Daniel Eklöf
61b7bf91f7
Merge branch 'fix-crash-when-closing-window'
Closes #289
2021-01-12 13:27:09 +01:00
Daniel Eklöf
214371458e
reaper: remove child from list *before* calling the user provided callback
The user provided callback may call reaper_del(), in which case we
will crash when we also try to remove the child from the list.

Remove it from the list before the callback means reaper_del() (if
called by the callback) will just loop through the entire list without
finding the pid and thus do nothing.
2021-01-12 09:30:27 +01:00
Daniel Eklöf
6b539ba373
term: remove client application’s pid from reaper when shutting down
When we are shutting down the terminal, we explicitly wait for the
child application to terminate (with a timeout, after which the child
process is killed).

I.e. there’s no need to let the reaper handle it. In fact, doing so
leads to a crash since we will have destroyed (and thus free:d) the
terminal instance when the reaper callback is called.
2021-01-12 09:21:01 +01:00
Daniel Eklöf
fe12c54d35
pgo: stub implementation of reaper_del() 2021-01-12 09:20:54 +01:00
Daniel Eklöf
c83cc7f862
reaper: add reaper_del() - pid is no longer watched/monitored after this 2021-01-12 09:20:02 +01:00
Daniel Eklöf
dce402ae42
config: pt_or_px cannot be a union 2021-01-11 19:37:05 +01:00
Daniel Eklöf
deaff095c6
wayland: take rotation into account when calculating the logical PPI 2021-01-11 17:53:27 +01:00
Daniel Eklöf
baf7dcaae6
doc: foot.ini: remove mention of geometry; this option has been removed 2021-01-11 11:05:35 +01:00
Daniel Eklöf
b2864056a6
doc: foot.ini: dpi-aware: shorten sentence 2021-01-11 10:57:51 +01:00
Daniel Eklöf
3672451538
doc: foot.ini: line-height: “no set” -> “not set” 2021-01-11 10:56:40 +01:00
Daniel Eklöf
e850f820d4
doc: foot.ini: remove empty line after ‘font’ options 2021-01-11 10:55:28 +01:00
Daniel Eklöf
fa306d109b
changelog: glyhps -> glyphs 2021-01-11 09:35:01 +01:00
Daniel Eklöf
83fd67409b
Merge branch 'line-height-and-letter-spacing'
Closes #244
2021-01-11 09:31:29 +01:00
Daniel Eklöf
44db2e2d0a
changelog: move line-height entry from ‘changed’ to ‘added’ 2021-01-11 09:31:22 +01:00
Daniel Eklöf
6d0cf814bc
config: fix comment: -1 is a valid ‘px’ value 2021-01-11 09:31:09 +01:00
Daniel Eklöf
25c2379d5f
box-drawing: x/y offsets: use pre-calculated offset values from term struct 2021-01-11 09:31:09 +01:00
Daniel Eklöf
1830dfca55
term: use pt_or_px_as_pixels() 2021-01-11 09:31:08 +01:00
Daniel Eklöf
5ea37adaf4
term: add pt_or_px_as_pixels()
This function takes a ‘union pt_or_px’ and converts its value to a
pixel value.
2021-01-11 09:31:08 +01:00
Daniel Eklöf
17339410ef
doc: foot.ini: line-height, letter-spacing and offsets are in points (by default) 2021-01-11 09:31:08 +01:00
Daniel Eklöf
a6fc8b5da4
config: line-height, letter-spacing: values are in pt by default, but we allow px
If the value is specified without a unit, then the value is assumed to
be in points, subject to DPI scaling.

The value can optionally have a ‘px’ suffix, in which case the value
is treated as a raw pixel count.
2021-01-11 09:31:08 +01:00
Daniel Eklöf
4c9f593d91
config: str_to_color(): use LOG_AND_NOTIFY(), not just LOG() 2021-01-11 09:31:08 +01:00
Daniel Eklöf
a455797bf2
changelog: line-height, letter-spacing and {horizontal,vertical}-letter-offset 2021-01-11 09:31:07 +01:00
Daniel Eklöf
d1f43371bb
doc: foot.ini: document line-height, letter-spacing and letter offsets 2021-01-11 09:31:07 +01:00
Daniel Eklöf
e8b673e7b2
doc: foot.ini: put ‘shell’, ‘login-shell’ and ‘term’ first 2021-01-11 09:31:07 +01:00
Daniel Eklöf
c2be3408ed
config; {horizontal,vertical}-letter-offsets may be negative 2021-01-11 09:31:07 +01:00
Daniel Eklöf
70cfcf11fb
config: letter-spacing: make this a relative value
0, the default, means no additional spacing; the cell width is defined
by the font metrics.

A positive value *adds* to the width from the font metrics, while a
negative value *subtracts*.
2021-01-11 09:31:06 +01:00
Daniel Eklöf
389570b274
box-drawing: compensate for non-zero {horizontal,vertical}-letter-offsets
Box drawing characters should always cover the entire cell. No more,
no less.
2021-01-11 09:31:06 +01:00
Daniel Eklöf
3eba48d74b
render: offset all glyphs with {horizontal,vertical}-letter-offset 2021-01-11 09:31:06 +01:00
Daniel Eklöf
a0c359c24e
term: set_fonts: use custom line-height+letter-spacing, if set
If the user has configured a custom line-height and/or letter-spacing,
use that instead of the font metrics.
2021-01-11 09:31:06 +01:00
Daniel Eklöf
428b5ef27c
foot.ini: add new options: line-height, letter-spacing and *-letter-offset 2021-01-11 09:31:06 +01:00
Daniel Eklöf
f9c9dd2432
config: add line-height, letter-spacing, {horizontal,vertical}-letter-offset 2021-01-11 09:31:05 +01:00
Daniel Eklöf
2177bacd6f
Merge branch 'fish-completions'
Closes #11
2021-01-08 21:33:22 +01:00
FollieHiyuki
bb1b8bc7ca Add fish completion 2021-01-08 20:37:33 +03:00
Daniel Eklöf
ba48109a9b
Merge branch 'center-grid-content'
Closes #273
2021-01-07 12:08:31 +01:00
Daniel Eklöf
124759bd2c
render: sixel: fix assertion: x/y coords may be outside visible area
But when they are, width/height must be 0.
2021-01-06 16:57:07 +01:00
Daniel Eklöf
e14c592f39
config: add optional ‘center’ argument to ‘pad’
When set, the grid contents is centered in the window. I.e. the
left/right and top/bottom margins are equal (+- 1px).

This causes the content to “jump” while doing an interactive resize,
but may still be preferred in e.g. a tiling WM.

Closes #273
2021-01-06 11:17:29 +01:00
Daniel Eklöf
21dbb44a30
selection: extend-block: update pivot point and selection direction 2021-01-06 11:14:11 +01:00
Daniel Eklöf
3a34eda8cc
selection: extend: don’t copy to primary - it is done when RMB is released 2021-01-06 11:13:52 +01:00
Daniel Eklöf
b09197ea07
selection: extend: re-calculate pivot point 2021-01-06 11:07:19 +01:00
Daniel Eklöf
f236dc7701
selection: break out pivot point adjustment for character-wise selections 2021-01-06 10:54:53 +01:00
Daniel Eklöf
3a9172342f
selection: combine enum selection_kind with selection_semantic 2021-01-06 10:53:27 +01:00
Daniel Eklöf
fcca3d3e55
Merge branch 'extend-selection-by-word'
Closes #267
2021-01-04 20:27:57 +01:00
Daniel Eklöf
dc676f96ce
render: codespell: accomodate -> accommodate 2021-01-04 19:49:24 +01:00
Daniel Eklöf
fd5d68c819
extract: finish: increase ‘idx’ when pushing new data, for consistency
We don’t write anything more to the buffer after this, but this makes
this code consistent with all other code that pushes new data to the
buffer.

This makes it easier to search, and validate, the
ensure_size()+push-data pattern.
2021-01-04 19:48:44 +01:00
Daniel Eklöf
07078da0f0
extract: finish: fix bad assertion - ‘idx’ may be equal to ‘size’
‘idx’ is where _new_ data should be pushed into the buffer. Thus it is
perfectly valid for it to be equal to ‘size’ - it just means we need
to allocate more space before pushing data to it.
2021-01-04 19:48:44 +01:00