| Commit message (Collapse) | Author | Age | Lines |
| |\ |
|
| | | |
|
| |/
|
|
|
| |
Instead of referencing the un-tokenized “raw” command string, strdup()
each argv. This way, the input string can be ‘const’.
|
| | |
|
| |\ |
|
| |/
|
|
|
|
|
|
| |
This option controls the foreground color of the
minimize/maximize/close buttons. I.e. the color used to draw the
minimize/maximize/close glyphs.
It defaults to default background color.
|
| | |
|
| |
|
|
|
| |
Don’t increment ‘j’ twice in each loop iteration, and fix typo in loop
condition (check ‘j’, not ‘i’).
|
| |\
| |
| |
| | |
Closes #591
|
| | |
| |
| |
| |
| | |
Create it once when instantiating the terminal. Add a boolean to track
whether the timer is running or not.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Using the frame callback works most of the time, but e.g. Sway doesn’t
call it while the window is hidden, and thus prevents us from updating
the title in e.g. stacked views.
This patch uses a timer FD instead. We store a timestamp from when the
title was last updated. When the application wants to update the
title, we first check if we already have a timer running, and if so,
does nothing.
If no timer is running, check the timestamp. If enough time has
passed, update the title immediately.
If not, instantiate a timer and wait for it to trigger.
Set the minimum time between two updates to ~8ms (twice per frame, for
a 60Hz output, and ~once per frame on a 120Hz output).
Closes #591
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
Clang-11.0 doesn’t seem to understand that our ‘static const’ key
modifiers are compile-time constant. Clang-11.1 doesn’t appear to have
this issue.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
tllists are great when dealing with dynamically changing lists. They
are also very easy to use when building lists/arrays where the final
size is unknown.
However, this ease of use comes at a price: code size. tll-macros
expand to a lot of code.
Since things in the config are static, once the config has been
loaded, using tllists for configuration data structures doesn’t make
much sense.
This patch replaces nearly all tllists used by the configuration, with
dynamically allocated arrays.
|
| |\ |
|
| | | |
|
| |\ \
| |/
|/|
| | |
Closes #490
|
| |/
|
|
|
|
|
|
| |
This option allows the user to configure a custom underline
offset. That is, use the user provided offset instead of the font
provided one.
Closes #490
|
| | |
|
| |\ |
|
| |/
|
|
|
|
|
| |
URI ranges are sorted. This means we don’t have to check any more
ranges once we’ve seen one that starts *after* the erase range.
Closes #594
|
| |
|
|
|
|
|
|
|
| |
When printing a character to a cell, we copy the current VT state’s
attributes to the cell. And then clear the ‘clean’ bit.
But the ‘clean’ bit is part of the VT state, and is *always*
zero. Thus there’s no need to explicitly clear it right after copying
the VT state.
|
| |
|
|
| |
This reverts commit 1dabc10494ac6626398c99507b791a21b923a616.
|
| |\ |
|
| |/ |
|
| | |
|
| |\
| |
| |
| | |
Closes #359
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is a fairly new XTerm extension. The reply is on the format:
DCS > | text ST
XTerm replies with ‘text’ = “XTerm(366)”.
Foot replies with ‘text’ = “foot(1.6.4)”
Closes #359
|
| | |
| |
| |
| |
| | |
This will be set to “rrr-gNNNNNNN” when building from git, and the
empty string otherwise.
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
| |
There's no mention of SS0 or SS1 functions in ECMA-48 or ECMA-35.
0x0E/0x0F are SO/SI (Shift In/Out) in "7-bit environments" or LS0/LS1
(Locking Shift 0/1) in "8-bit environments". The former is the one
that applies to foot, since it generally follows "7-bit" conventions
due to its use of UTF-8.
See also: ECMA-35 §7.2 and §9.2.
|
| | |
|
| |\
| |
| |
| | |
Closes #554
|
| |/
|
|
|
|
|
|
|
| |
Allow any configuration option to be overridden with -o/--override
'section.key=value' arguments, as suggested in #554
update completitions for override
slight refactoring to ease footclient support
|
| |\ |
|
| | |
| |
| |
| |
| | |
And don’t notify the user in the terminal window, only log it on
stderr.
|
| |/ |
|
| |\
| |
| |
| | |
Closes #586
|
| |/
|
|
| |
Closes #586
|
| |\
| |
| |
| | |
Closes #583
|
| |/
|
|
|
|
|
|
|
| |
We were already offering these mime types for our own clipboard data,
but ignored them in incoming offers.
Fixes paste issues from Geany.
Closes #583
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
This commit also renames the term_set_single_shift_ascii_printer()
function to term_single_shift(), since the former is overly verbose
and not really even accurate.
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
These sequences are supposed to affect the next printable ASCII
character and then reset to the previous character set, but before
this commit they were behaving like locking shifts.
|
| | | |
|
| |\ \
| | |
| | |
| | | |
Closes #562
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Writing a sixel on top of an already existing sixel currently has the
following limitations in foot:
* The parts of the first sixel that is covered by the new sixel are
removed, completely. Even if the new sixel has transparent
areas. I.e. writing a transparent sixel on top of another
sixel *replaces* the first sixel with the new sixel, instead of
layering them on top of each other.
* The second sixel erases the first sixel cell-wise. That is, a sixel
whose size isn’t a multiple of the cell dimensions will leave
unsightly holes in the first sixel.
This patch takes care of both issues.
The first one is actually the easiest one: all we need to do is
calculate the intersection, and blend the two images. To keep things
relatively simple, we use the pixman image from the *new* image, and
use the ‘OVER_REVERSE’ operation to blend the new image over the old
one.
That is, the old image is still split into four tiles (top, left,
right, bottom), just like before. But instead of throwing away the
fifth middle tile, we blend it with the new image. As an optimization,
this is only done if the new image has transparency (P1=1).
The second problem is solved by detecting when we’re erasing an area
from the second image that is larger than the new image. In this case,
we enlarge the new image, and copy the old image into the new one.
Finally, when we enlarge the new image, there may be areas in the new
image that is *not* covered by the old image. These areas are made
transparent.
The end result is:
* Each cell is covered by at *most* 1 sixel image. I.e. the total
numbers of sixels are finite. This is important for the ‘mpv
--vo=sixel’ use case - we don’t want to end up with thousands of
sixels layered on top of each other.
* Writing an opaque sixel on top of another sixel has _almost_ zero
performance impact. Especially if the two sixels have the same size,
so that we don’t have to resize the new image. Again, important for
the ‘mpv --vo=sixel’ use case.
Closes #562
|
| |\ \
| |/
|/|
| | |
Closes #508
|
| | | |
|
| | |
| |
| |
| |
| | |
This makes us pass the vttest 11.5.4 (Test non-VT100 -> Test ISO-6429
cursor-movement -> CHT) test.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
If the cursor is already at the right edge, our logic that checked for
non-empty cells failed; it didn’t check the current cell.
Fix by initializing ‘emit_tab_char’ to true/false, depending on the
contents of the current cell.
|
| | |
| |
| |
| |
| |
| | |
That is, we choose to copy the tab character, and not the spaces it
represents. Most importantly, we don’t copy *both* the tab and the
spaces.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TAB (\t) move the cursor to the next tab stop. That’s it, according to
the specification.
However, many terminal emulators try to keep tabs in the grid, to be
able to e.g. copy them. That is, copying a text chunk containing tabs
should result in tabs being pasted, not spaces.
In order to do that, we need to print a tab character to the grid. To
improve text reflow of tabs, we also print spaces to the subsequent
cells, up until (but not including) the next tab stop.
However, we can only do this if all the cells between the cursor and
the next tab stop are empty, since (obviously), we cannot overwrite
pre-existing characters.
Finally, while some fonts render tabs as spaces (i.e. an empty glyph),
some use a glyph representing “unprintable” characters, or
similar. Thus, we need to exclude cells with tab characters when
rendering.
|
| |\ |
|
| |/
|
|
|
|
|
|
|
| |
This fixes vttest 11.6.6.3
Test non-VT100 ->
Test ISO-6429 colors ->
Test of VT102-style features with BCE ->
Test Insert/Delete Char/Line
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
This matches XTerm behavior, and fixes vttest 11.6.6.2:
Test non-VT100 ->
Test ISO-6429 colors ->
Test of VT102-style features with BCE ->
Test of screen features
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Only the first character in the chain was being compared with `priv`
and the rest were just being evaluated as simple expressions. This
was causing the G2 and G3 operations to erroneously use the G1 index.
Since the characters are a contiguous range, we can just subtract the
start of the range to get the appropriate index. The outer switch
statement already ensures the values are in range.
|
| |/
|
|
|
|
|
|
|
|
| |
Without this fix, setting LOG_ENABLE_DBG to 1 in terminal.c would
cause the following error:
> terminal.c:1787: 'struct terminal' has no member named 'font_scale'
The 'font_scale' member was removed in commit
2afc6782361d0deaa443234466775b1121feec8f.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
When marking and unmarking cells, we don’t highlight trailing empty
cells. We do however highlight empty cells if they are followed by
non-empty cells.
I think this was an intentional choice. If one row ended with trailing
empty cells, but *no* hard linebreak, then we’d continue on the next
row, and emit all the empty cells once we hit a non-emtpy cell on the
second row.
But this is something that shouldn’t happen in any real-world use
cases.
|
| |\
| |
| |
| | |
Closes #573
|
| |/
|
|
|
|
|
|
|
| |
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
|
| |\ |
|
| |/ |
|
| |\
| |
| |
| | |
Closes #504
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
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.
|
| | |
| |
| |
| |
| | |
Instead of strdup:ing the URI, take over ownership. This is ok since
the old URI range will be free:d anyway.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |\ |
|
| |/
|
|
|
|
| |
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.
|
| |\ |
|
| |/
|
|
|
|
|
|
| |
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.
|
| |\ |
|
| |/
|
|
|
|
| |
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.
|
| |\
| |
| |
| | |
Closes #549
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| |/ |
|
| |\ |
|
| |/
|
|
|
|
|
| |
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
|