Commit graph

532 commits

Author SHA1 Message Date
Daniel Eklöf
7609fbba47
term: increase/decrease custom line-height with font size changes
When the user has set a custom line-height, we now adjust it when
increasing/decreasing (“zooming”) the font size at run-time.

Previously, the line-height was fixed at the size specified in
foot.ini.
2021-03-21 16:29:35 +01:00
Daniel Eklöf
0c85905972
input: must have all required modifiers to un-shift a symbol
When detecting, and repairing, “broken” key bindings (where the key
binding itself explicitly lists a modifier that is consumed by the
final symbol - e.g “Shift+W”), don’t just look for an intersection
between the set of modifiers needed to produce the final symbol, and
the modifiers listed in the key combo. Instead, check if the key combo
has *all* the required modifiers.

Example: Shift+AltGr+w produces Page_Down. I.e. Page_Down is the
_shifted_ symbol, ‘w’ is the un-shifted symbol, and Shift+AltGr are
the modifiers required to shift ‘w’ to Page_Down.

If we have the key combo Shift+Page_Down, foot would, correctly,
determine that Page_Down is a shifted symbol. It would find the
Shift+AltGr modifier set, and since the intersection of “Shift+AltGr”
and “Shift” (from our key combo) is non-empty, foot
would (incorrectly) determine that we can, and should, replace
Page_Down with its un-shifted symbol ‘w’.

This is completely wrong, since Shift+w does _not_ produce Page_Down.

Closes #407
2021-03-21 16:22:08 +01:00
Daniel Eklöf
3fbbf5f81f
changelog: add new ‘unreleased’ section 2021-03-20 14:14:58 +01:00
Daniel Eklöf
be6f7ff934
changelog: 1.7.0 2021-03-20 14:02:12 +01:00
Simon Schricker
b169623b64
Add: Bash completion for foot and footclient
* use toe for terminfo, thanks Craig.
* adds optional dependency on bash-completion for positional arguments

Co-authored-by: Craig Barnes <craigbarnes@protonmail.com>
2021-03-17 13:10:28 +01:00
Daniel Eklöf
2a723e1c4c
Merge branch 'sixel-fix-max-geometry' 2021-03-14 13:07:13 +01:00
Daniel Eklöf
e7a4378f18
Merge branch 'option-no-wait'
Closes #395
2021-03-14 13:05:41 +01:00
Daniel Eklöf
6eb68ffbd9
sixel: max geometry should be max geometry, not current window size
“current geometry” will report whatever value is the smallest; the max
geometry or the current window size.

But “max geometry” always returns the configured max geometry.

This aligns foot’s behavior with XTerm.
2021-03-14 10:58:13 +01:00
Felipe Trzaskowski
452830bd08 add changelog entry, completions and man entry for -N, --no-wait 2021-03-13 08:07:08 -03:00
Daniel Eklöf
329f2a488c
term: don’t close PTY when client application dies
Closing it as soon as we detect that the client has died, means we may
not have drained it completely.

The PTY is either closed _by_ the client application, or by us when we
shutdown the terminal. Thus, leaving it open (until we call
term_shutdown()) is fine.
2021-03-12 22:06:50 +01:00
Daniel Eklöf
ebc57d1a80
changelog: sixel decoding performance improvements 2021-03-12 21:43:35 +01:00
Daniel Eklöf
5a9ae07167
changelog: implemented DCS parameter P2 2021-03-11 17:37:56 +01:00
Daniel Eklöf
5e852f148e
changelog: empty pixel rows at the bottom of a sixel is now trimmed 2021-03-11 17:33:01 +01:00
Daniel Eklöf
6cd72bdee6
input: do not include consumed modifiers in the set sent to the client
When sending a key escape sequence to the client application, do not
include consumed modifiers.

Fixes part of #376
2021-03-08 20:30:23 +01:00
Craig Barnes
2e31a1ec7a meson: bump minimum xkbcommon version to 1.0.0
This requirement is due to the recently added maybe_repair_key_combo()
function, which is making use of xkb_keymap_key_get_mods_for_level().

See also: commit a5b554761a.
2021-03-07 19:28:17 +00:00
Daniel Eklöf
b796965c3d
changelog: new key binding matching logic 2021-03-04 10:13:47 +01:00
Daniel Eklöf
6654aab620
changelog: oops, vertical-letter-offset is new in 1.7.x
No need to a changelog entry for fixing something that hasn’t yet been
released.
2021-03-02 09:25:06 +01:00
L3MON4D3
6edba44651 Mention fix in Changelog. 2021-03-01 20:26:56 +01:00
Daniel Eklöf
3f57cc9c01
Merge branch 'sixel-private-mode-80-scrolling'
Closes #361
2021-02-27 11:49:47 +01:00
Daniel Eklöf
dd73964cd5
changelog: default value of -t,--term in --help when built without terminfo 2021-02-26 15:16:42 +01:00
Daniel Eklöf
849427bf10
sixel: implement private mode 80 - sixel scrolling
When enabled (the default), sixels behave much like normal output; the
start where the cursor is, and the cursor moves with the
sixel. I.e. after emitting a sixel the cursor is left after the image;
either to the right, if private mode 8452 is enabled, or otherwise on
the next line. Terminal content is scrolled up if the sixel is larger
than the screen.

When disabled, sixels *always* start at (0,0), the cursor never moves,
and the terminal content never scrolls.

In other words, the ‘disabled’ mode is a much simpler mode.

All we need to do to support both modes is re-write the sixel-emitting
loop to:

* break early if we’re “out of rows”, i.e. we’ve reached the bottom of
  the screen.
* not linefeed, or move the cursor when scrolling is disabled

This patch also fixes a bug in the (new) implementation of private
mode 8452.

When emitting a sixel, we may break it up into smaller pieces, to
ensure a single sixel (as tracked internally) does not cross the
scrollback wrap-around.

The code that checked if we should do a linefeed or not, would skip
the linefeed on the last row of *each* such sixel piece. The correct
thing to do is to skip it only on the last row of the *last* piece.

I chose not to fix this bug in a separate patch since doing so would
have meant re-writing it again when implementing private mode 80.
2021-02-26 09:28:03 +01:00
Craig Barnes
b1385f6439 changelog: change "control- and escape sequences" to "escape sequences"
According to the way ECMA-48 defines these terms, "escape sequences"
are a superset of "control sequences", so there's no real reason to
mention both.
2021-02-23 19:58:26 +00:00
Craig Barnes
0da0532432 changelog: fix a typo 2021-02-23 19:57:34 +00:00
Daniel Eklöf
f3e081ad0a
changelog: add missing space character 2021-02-23 20:02:40 +01:00
Daniel Eklöf
c4ad12c1d8
changelog: added man page foot-ctlseq.7 2021-02-23 20:02:06 +01:00
Daniel Eklöf
03c675c6e2
sixel: implement private mode 8452 - cursor positioning after sixel
When disabled (the default), the cursor is positioned on a new line
after emitting a sixel image.

When enabled, the cursor is positioned to the right of the sixel
image.

Closes #363
2021-02-23 10:36:02 +01:00
Daniel Eklöf
4aa980a6a2
sixel: implement private mode 1070 - private color palette
When enabled (the default), sixels use private color registers. That
is, the color palette from the last sixel is *not* re-used.

When disabled, sixels share (i.e. re-use) the same color palette.

Closes #362
2021-02-23 09:40:22 +01:00
Daniel Eklöf
3c6d4f152b
changelog: OSC-8 support 2021-02-21 20:16:25 +01:00
Daniel Eklöf
dd5c31657e
spawn/slave: restore signal mask after fork
slave: no need to restore signal handlers; they are automatically
restored as long as they are not SIG_IGN (which they never are in
foot).

spawn(): restore signal mask after fork. This fixes an issue where a
terminal spawned with ctrl+shift+n did not terminate when its shell
exited.

Closes #366
2021-02-21 19:59:50 +01:00
Daniel Eklöf
8658ab4bed
csi: ‘CSI 13 ; 2 t’ reply is now (0,0)
Foot previously responded with window local coordinates.

But, XTerm responds with screen *absolute* coordinates. This isn’t
possible under Wayland, thus we now report (0,0) instead. Same as we
do for ‘CSI 13 ; 0 t’.
2021-02-16 14:31:46 +01:00
Daniel Eklöf
37c4917e8e
changelog: -D,--working-directory=DIR 2021-02-12 21:42:53 +01:00
Daniel Eklöf
df1ed1c8cf
Merge branch 'releases/1.6' 2021-02-12 21:41:53 +01:00
Daniel Eklöf
c18e459757
changelog: prepare for 1.6.4 2021-02-12 21:27:15 +01:00
Daniel Eklöf
299904e987
selection: don’t strip formatting C0 control characters in bracketed paste mode
It’s ok to let the receiving end handle formatting C0 control
characters in bracketed paste mode.

In fact, we *must* let them through. Otherwise it is impossible to
paste e.g. tabs into editors and similar applications.
2021-02-12 20:58:37 +01:00
Daniel Eklöf
0da766e505
selection: don’t strip formatting C0 control characters in bracketed paste mode
It’s ok to let the receiving end handle formatting C0 control
characters in bracketed paste mode.

In fact, we *must* let them through. Otherwise it is impossible to
paste e.g. tabs into editors and similar applications.
2021-02-12 15:59:07 +01:00
Daniel Eklöf
caede90544
changelog: use standard signals for SIGCHLD 2021-02-12 10:58:58 +01:00
Daniel Eklöf
c0bff58d8d
changelog: selection-target=none|primary|clipboard|both 2021-02-12 10:56:28 +01:00
Daniel Eklöf
a60b7babd3
changelog: -Dterminfo changed from boolean to feature option 2021-02-12 10:48:13 +01:00
Tadeo Kondrak
8a32c5c5c1
ime: Reset terminal's IME state on text_input.leave
To reproduce issue:
- Launch an IME from inside foot
- Type in some preedit text
- Use Ctrl-C to close the IME
- IME text stays in terminal until focus is changed
2021-02-12 10:45:43 +01:00
Daniel Eklöf
6e94da182c
changelog: add section for 1.6.4 2021-02-12 10:44:42 +01:00
Daniel Eklöf
4753d34163
changelog: use standard signals for SIGCHLD 2021-02-11 19:54:55 +01:00
Daniel Eklöf
da7da4cba5
Merge branch 'log-level'
Closes #337
2021-02-11 19:00:09 +01:00
Daniel Eklöf
7698077331
changelog: -d,--log-level 2021-02-09 21:22:16 +01:00
Daniel Eklöf
b65366f00c
changelog: -Dterminfo changed from boolean to feature option 2021-02-09 19:44:57 +01:00
Daniel Eklöf
fec19f1503
changelog: URL mode 2021-02-07 16:33:35 +01:00
Daniel Eklöf
5a2e44e24e
changelog: some mouse events never being sent to the client application 2021-02-02 09:53:24 +01:00
Tadeo Kondrak
1515b7e44b
ime: Reset terminal's IME state on text_input.leave
To reproduce issue:
- Launch an IME from inside foot
- Type in some preedit text
- Use Ctrl-C to close the IME
- IME text stays in terminal until focus is changed
2021-01-30 12:24:12 -07:00
Daniel Eklöf
c4363ef336
Merge branch 'releases/1.6' 2021-01-29 20:12:32 +01:00
Daniel Eklöf
efd1e05b48
changelog: prepare for 1.6.3 2021-01-29 19:52:27 +01:00
Tadeo Kondrak
8f0a3ee7a9
Send text_input_rectangle requests for text-input 2021-01-29 19:39:48 +01:00