Commit graph

4361 commits

Author SHA1 Message Date
Daniel Eklöf
a7e2e4bfa9
input: pass through scrollback-* key bindings when alt screen is activw
Since the alt screen have no scrollback, all scrollback-* actions are
effectively no-ops when the alt screen is active.

Make them available to the client application instead.

Closes #573
2021-06-04 23:25:45 +02:00
Daniel Eklöf
b5515a414a
Merge branch 'osc-9' 2021-06-04 07:44:07 +02:00
Daniel Eklöf
405b887a82
osc: implement iTerm2’s OSC-9 - desktop notifications 2021-06-04 07:44:00 +02:00
Daniel Eklöf
dd43afd754
Merge branch 'chunked-reflow'
Closes #504
2021-06-04 07:43:18 +02:00
Daniel Eklöf
354de2b8ee
changelog: text reflow performance 2021-06-04 07:42:53 +02:00
Daniel Eklöf
3292bb5b8e
grid: reflow: ‘amount’ has already been added to ‘from’ 2021-06-02 20:13:52 +02:00
Daniel Eklöf
cb83d60089
selection: fix bad assertion
When there are multiple multi-column characters back-to-back, the cell
before the pivot end point may in fact be a SPACER+1 cell.
2021-06-02 20:13:52 +02:00
Daniel Eklöf
a003e56fdc
grid: reflow: URI range start: take over ownership of URI string
Instead of strdup:ing the URI, take over ownership. This is ok since
the old URI range will be free:d anyway.
2021-06-02 20:13:52 +02:00
Daniel Eklöf
8a9643de67
grid: reflow: debug logging 2021-06-02 20:13:51 +02:00
Daniel Eklöf
ceab9b9367
grid: reflow: when determining row end coord, check *last* URI range 2021-06-02 20:13:51 +02:00
Daniel Eklöf
5a08ed641b
grid: reflow: when determining row end coord, check *last* tracking point 2021-06-02 20:13:51 +02:00
Daniel Eklöf
ef1fdc40c8
grid: reflow: check the *entire* row for non-empty cells 2021-06-02 20:13:51 +02:00
Daniel Eklöf
c2314d689e
grid: reflow: avoid unnecessary if-statements before chunking a row 2021-06-02 20:13:51 +02:00
Daniel Eklöf
2029d201b5
grid: disable reflow timing by default 2021-06-02 20:13:51 +02:00
Daniel Eklöf
ac97f20f99
grid: reflow: comments 2021-06-02 20:13:51 +02:00
Daniel Eklöf
5325ea042d
grid: no need to keep the tp_col/uri_col variables around 2021-06-02 20:13:51 +02:00
Daniel Eklöf
3453f091a3
grid: fix col max calculation when row contains URI ranges 2021-06-02 20:13:51 +02:00
Daniel Eklöf
a56b54ad2f
grid: set tp/uri break flags explicitly when we know them to be true 2021-06-02 20:13:51 +02:00
Daniel Eklöf
4b7e4fb885
grid: reflow: slightly simplified logic for end-coordinate calculation 2021-06-02 20:13:51 +02:00
Daniel Eklöf
315865f18c
grid: reflow: rename _range -> range 2021-06-02 20:13:51 +02:00
Daniel Eklöf
7c3a4b24d9
grid: reflow: remove dead code 2021-06-02 20:13:50 +02:00
Daniel Eklöf
40ca86b2d3
grid: reflow: memcpy() chunks of cells, instead of single cell-by-cell
Instead of walking the old grid cell-by-cell, and checking for
tracking points, OSC-8 URIs etc on each cell, memcpy() sequences of
cells.

For each row, find the end column, by scanning backward, looking for
the first non-empty cell.

Chunk the row based on tracking point coordinates. If there aren’t any
tracking coordinates, or OSC-8 URIs on the current row, the entire row
is copied in one go.

The chunk of cells is copied to the new grid. We may have to split it
up into multiple copies, since not all cells may fit on the current
“new” row.

Care must also be taken to not line break in the middle of a
multi-column character.
2021-06-02 20:13:50 +02:00
Daniel Eklöf
6671d53859
Merge branch 'restore-sighup-handler' 2021-06-02 20:13:26 +02:00
Daniel Eklöf
a72b2688bd
slave/spawn: restore SIGHUP handler after fork(), before exec()
Foot installs a SIG_IGN handler for SIGHUP. Ignored signals are
inherited in sub-processes. Thus, we need to restore it to SIG_DFL
before exec:ing.
2021-06-02 20:13:14 +02:00
Daniel Eklöf
2f7e5aed40
Merge branch 'dont-split-multi-column-chars-when-resizing-alt-screen' 2021-06-02 20:12:01 +02:00
Daniel Eklöf
b7709cc013
grid: don’t cut multi-column chars in half when resizing the alt screen
When we resize the alt screen, we don’t reflow the text, we simply
truncate all the lines.

When doing this, make sure we don’t truncate in the middle of a
multi-column character.
2021-06-02 19:32:05 +02:00
Daniel Eklöf
363aeea2df
Merge branch 'url-mode-off-by-one' 2021-06-02 08:11:20 +02:00
Daniel Eklöf
974c3acd78
url-mode: off-by-one error in end-point column of auto-detected URLs
When an auto-detected URL ended *on* the right-most column, the URL
endpoint was off by one, resulting in the underline in URL mode being
one character short.
2021-06-02 08:11:14 +02:00
Daniel Eklöf
19429d13a3
Merge branch 'document-terminfo'
Closes #549
2021-06-02 08:10:19 +02:00
Daniel Eklöf
2ffedc7082
doc: foot{,client}: updates from feedback from @craigbarnes 2021-06-02 08:10:02 +02:00
Daniel Eklöf
1321b23567
doc: footclient.1: -t,--term: add references to ENVIRONMENT and TERMINFO sections 2021-06-02 08:10:02 +02:00
Daniel Eklöf
a1a521b81d
doc: footclient.1: add TERMINFO section 2021-06-02 08:10:02 +02:00
Daniel Eklöf
d6715625e2
doc: foot.1: -t,--term: add references to ENVIRONMENT and TERMINFO sections 2021-06-02 08:10:02 +02:00
Daniel Eklöf
dde31ffaf9
doc: foot.1: add TERMINFO section 2021-06-02 08:09:52 +02:00
Daniel Eklöf
f74c5fa9f0
Merge branch 'pua-double-width' 2021-06-01 17:51:25 +02:00
Daniel Eklöf
4c954be7a6
config: add boolean option tweak.pua-double-width
When enabled, PUA (Private Usage Area) codepoints are always treated
as double-width glyphs, regardless of the actual glyph width.

Requires allow-overflowing-double-width-glyphs=yes
2021-06-01 17:51:09 +02:00
Daniel Eklöf
d458d46f81
Merge branch 'selection-recognizes-hard-linebreaks'
Closes #565
2021-06-01 17:50:24 +02:00
Daniel Eklöf
f0041882f1
selection: pay attention to hard linebreaks when search for word boundaries
Double-clicking on a word in the left or right margin, would line-wrap
the selection if there was a non-empty cell in the corresponding
right/left margin on the prev/next line. Regardless of whether there
was a hard linebreak or not.

Script to reprouce:

  !/bin/bash

  cols=$(tput cols)
  printf "%*coo\nbar\n" $((${cols} - 2)) f

Run, then double click either “foo” or “bar”. Neither should select
the other part.

Closes #565
2021-05-31 17:15:20 +02:00
Daniel Eklöf
d5ff8c5f6f
Merge branch 'environment-docs'
Closes #556
2021-05-30 10:21:44 +02:00
Daniel Eklöf
4e3fdaa8f2
changelog: add bug ref to ‘environment section added to foot/footclient’ 2021-05-30 10:21:24 +02:00
Craig Barnes
d08096b201
doc: add ENVIRONMENT section to foot(1) and footclient(1) man pages
Closes #556
2021-05-30 10:20:48 +02:00
Daniel Eklöf
23e6a0a0ee
Merge branch 'include-directive'
Closes #555
2021-05-30 10:01:15 +02:00
Daniel Eklöf
9055d3d921
config: add ‘include’ directive
This allows you to include sub-configurations. For example, theme
files.

The ‘include’ directive is a top-level keyword. I.e. it cannot be used
inside sections.

* The included file must be specified with an absolute path
* The included file is parsed in its own scope
* Nested includes are allowed
* Multiple include directives are allowed

Closes #555
2021-05-28 17:44:13 +02:00
Daniel Eklöf
8262c1f0c2
Merge branch 'add-window-title-template-parameter' 2021-05-27 12:13:18 +02:00
Daniel Eklöf
f1d75a1e1f
notify: add ${window-title} 2021-05-27 12:11:47 +02:00
Daniel Eklöf
ef4dc4bb7c
Merge branch 'app-id-in-notify' 2021-05-27 11:53:05 +02:00
Daniel Eklöf
f9a13e2eec
config: notify: change default value to use ${app-id}
Make the default value of ‘notify’ use ${app-id} for icon and
application name.
2021-05-27 11:41:57 +02:00
Daniel Eklöf
246c7ffc0f
readme: add OSC 8, 17, 19, 117, 119 and 777 to list of supported OSC 2021-05-26 22:45:48 +02:00
Craig Barnes
e5fedb77d9 Merge branch 'vt-remove-8bit-c1' 2021-05-26 20:07:51 +01:00
Daniel Eklöf
09f11b294d
Merge branch 'osc8-scrollback-wraparound'
Closes #552
2021-05-26 14:39:50 +02:00