| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since we know the following:
* URI ranges are sorted
* URI coordinates are unique
* URI ranges don’t cross rows
We can optimize URI range reflowing by:
* Checking if the *first* URI range’s start coordinate is on the
current column. If so, keep a pointer to it.
* Use this pointer as source when instantiating the reflowed URI range
* If we already have a non-NULL range pointer, check its end
coordinate instead.
* If it matches, close the *last* URI range we inserted on the new
row, and free/remove the range from the old row.
* When line breaking, we only need to check if the *last* URI range is
unclosed.
|
| | | |
|
| |/ |
|
| |\ |
|
| |/
|
|
|
|
| |
This expects a hyphen, not underscore, in the option name:
err: config.c:892: /home/user/.config/foot/foot.ini:34: [bell]: command_focused: invalid key
|
| |\ |
|
| |/ |
|
| |\ |
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
echo -e '\e]8;;https://www.foo.bar\e\\https://www.foo\e]8;;\e\\.bar'
will produce an OSC-8 URL (https://www.foo) that is slightly shorter
than the auto-detected one (https://www.foo.bar).
This produces strange results in URL mode. For example, if
url.osc8-underline=always, the OSC8 underline will be removed when
url-mode is exited.
This patch changes the behavior so that auto-detected URLs that
overlap OSC-8 URLs are removed.
Note that OSC-8 URLs cannot overlap with each other, and that
auto-detected URLs also cannot overlap with each other.
|
| |\
| |
| |
| | |
Closes #531
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
This makes the protocols recognized by auto-detected URLs
configurable.
Closes #531
|
| |/ |
|
| |\
| |
| |
| | |
Closes #524
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
Works in pretty much the same way as ‘beam-thickness’, except that the
default value is “the font’s underline thickness”.
This means, that when unset, the cursor underline thickness scales
with the font size.
But, when explicitly set, either to a point size value, or a pixel
size, it remains fixed at that size.
Closes #524
|
| |\
| |
| |
| | |
Closes #534
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes an issue where we, at least on FreeBSD, sometimes get stuck
in epoll_pwait() after the shell has exited.
It turned out to be because the SIGCHLD signal was delivered at the
same time FDs were made readable/writeable. I.e. epoll_pwait()
returned a non-zero value even though it should have been interrupted
by the SIGCHLD.
To avoid having to search the entire signal array *every time*
epoll_pwait() returns, add a flag that is set in the signal
handler. This tells the FDM to scan the signal array after returning
from epoll_pwait().
|
| |
|
|
|
|
|
|
|
|
|
| |
\e[21m was previously used to disable bold. That changed a while ago,
to align foot with the majority of other terminal emulators.
\e[22m now disables both bold and dim.
When this change was done, the user notifications were not updated,
meaning the ‘message’ part was always in bold. This was never the
intended behavior.
|
| |\ |
|
| | | |
|
| |/ |
|
| |
|
|
|
|
|
|
| |
So that the value is clamped to the range [0, 0x7fffffff] and retains
the same value, regardless of whether it's interpreted as a signed or
unsigned integer.
Closes #522
|
| |
|
|
|
|
|
|
| |
It _may_ be acceptable in e.g. tiling WMs, where windows are seldom
resized interactively.
But in a stacking WM where the typical way of resizing windows is by
interactive resizes, this spams way too much.
|
| | |
|
| |\
| |
| |
| | |
Closes #421
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
No need to call search_find_next() after doing a
search_match_to_end_of_word(), since we already *know* we have a
match, and where it is.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rewrite match_to_end_of_word() in terms of
* selection_find_word_boundary_right()
* extract_begin() + extract_one() + extract_finish()
This adds a small overhead, in that extract_*() allocates an internal
buffer, from which we then immediately copy, into our newly resized
prompt buffer.
On the other hand, this makes the matching behavior more consistent
with regular mouse selections, and we don’t have to keep two very
similar match-to-next-word-boundary implementations in sync.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
extract_finish() returns the extracted text in UTF-8, while
extract_finish_wide() returns the extracted text in Unicode.
This patch also adds a new argument to extract_finish{,_wide},
that when set to true, skips stripping trailing empty cells.
|
| | | |
|
| |/
|
|
|
|
| |
Besides disallowing matches that crosses the scrollback wrap-around,
this also fixes a crash when the trying to search beyond the last
output, when the scrollback history hasn’t yet been completely filled.
|
| |\ |
|
| | | |
|
| | |
| |
| |
| |
| | |
This way, the compiler doesn’t have to waste instructions on
re-ordering the parameters
|
| | |
| |
| |
| |
| | |
It results in quite a lot of floating point instructions being emitted
in almost every box drawing function we have...
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When enabled, shades are rendered as solid blocks, using a darker
variant of the current foreground color.
When disabled, shades are instead rendered in a checker box pattern,
using the foreground color unmodified.
Default is enabled.
|
| | |
| |
| |
| |
| | |
This causes relevant box drawing characters (diagonals, arcs etc) to
be antialiased as well.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When drawing on an a8 buffer, apply antialiasing to LIGHT ARCs. This
is done by supersampling; draw to a 4 times bigger buffer, then
downsample, where each downsampled pixel is the average of the
corresponding 4x4 pixel from the supersampled buffer.
We also need to take supersampling into account while adjusting the row
and col when pixel aligning the arcs with the regular
horizontal/vertical lines.
The shape of the ARCs can still be improved. Still, this is a much
needed improvement over the current implementation.
Closes #279
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
For now, switching is done using a static variable. In the future,
this could be a user option.
|
| | |
| |
| |
| |
| |
| | |
We don’t have a method to draw the arcs using pixman yet. Work around
this by replacing the a8 buffer with an a1 buffer, and render the arcs
using our old, non-antialiased, way.
|
| | |
| |
| |
| |
| | |
The DARK shade is the one most dense, and thus the one that looks
brightest.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
When rendering to an a8 surface, render shades using “transparent”
pixman rectangles.
When these glyphs are composited with a color, the resulting look is
the color, but darkened.
|
| | | |
|
| | |
| |
| |
| | |
Use trapezoids to rasterize the diagonal lines.
|
| | |
| |
| |
| | |
Use pixman_image_fill_rectangles() to render rectangles. Duh!
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Use pixman_image_fill_rectangles() to render horizontal and vertical
lines.
Despite the name, this *is* the appropriate function to use, since our
lines *do* have a thickness, and thus *are* rectangles.
|
| | |
| |
| |
| | |
The inner corner, where the upper/left lines meet, were missing
|
| |/ |
|
| |\
| |
| |
| | |
Part of #504
|
| | |
| |
| |
| |
| |
| | |
This reduces the memory cost of reflowing text, as we no longer needs
to hold both the old and the new grid, in their entirety, in memory at
the same time.
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
We’re going to write to it immediately anyway. In most cases, *all*
newly allocated, and zero-initialized, cells are overwritten.
So let’s skip the zero-initialization of the new cells.
There are two cases where we need to explicitly clear cells now:
* When inserting a hard line break - erase the remaining cells
* When done, the *last* row may not have been completely written -
erase the remaining cells
|
| |\
| |
| |
| | |
Closes #509
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
We only needed term->font_scale to be able to detect scaling factor
changes (term->font_scale != term->scale).
But, we already have the old scaling factor in all places where
term_font_dpi_changed() is called, so let’s pass the old scaling
factor as an argument instead.
|
| | | |
|
| | | |
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
get_font_scale() was used to get the new scaling factor when loading
fonts. This was then compared to the last seen font scaling factor. If
there was no difference, the fonts were not reloaded.
The problem was, the initial term->scale was set differently. This
sometimes led to term->scale=2, while get_font_scale() return 1. That
meant, fonts were initially scaled by 2 (when dpi-aware=no). Later,
when mapped on an output (and thus term->scale being set to 1), the
fonts weren’t reloaded with the correct scaling factor since the
cached term->font_scale value was already 1.
Since term->scale always reflects the *new* scaling factor when
term_font_dpi_changed() is called, use that directly, and remove
get_font_scale().
Also rename the following functions:
* font_should_size_by_dpi() -> font_size_by_dpi_for_scale()
* font_size_by_dpi() -> font_sized_by_dpi()
* font_size_by_scale() -> font_sized_by_scale()
|
| |\
| |
| |
| | |
Part of #504
|
| | |
| |
| |
| | |
Replace with qsort() + global variable. Not thread safe!
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The row numbers in the tracking points are in absolute
numbers. However, when we walk the old grid, we do so starting in the
beginning of the scrollback history.
We must ensure the tracking points are sorted such that the *first*
one we see is the “oldest” one. I.e. the one furthest back in the
scrollback history.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of iterating a linked list of tracking points, for *each and
every* cell in the old grid, use a sorted array.
This allows us to step through the array of tracking points as we walk
the old grid; each time we match a tracking point, we move to the next
one.
This means we only have to check a single tracking point for each cell.
|
| | | |
|
| | |
| |
| |
| | |
Since we no longer call wcwidth(), we don’t need the base character.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Calling wcwidth() on every character in the entire scrollback history
is slow.
We already have the character width encoded in the grid; it’s in the
CELL_SPACERs following a multi-column character.
Thus, when we see a non-SPACER character, that isn’t in the last
column, peek the next character. If it’s a SPACER, get the current
characters width from it.
The only thing we need the width for, is to be able to print padding
SPACERS in the right margin, if the there isn’t enough space on the
current row for the current character.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of using CELL_SPACER for *all* cells that previously used
CELL_MULT_COL_SPACER, include the remaining number of spacers
following, and including, itself. This is encoded by adding to the
CELL_SPACER value.
So, a double width character will now store the character itself in
the first cell (just like before), and CELL_SPACER+1 in the second
cell.
A three-cell character would store the character itself, then
CELL_SPACER+2, and finally CELL_SPACER+1.
In other words, the last spacer is always CELL_SPACER+1.
CELL_SPACER+0 is used when padding at the right margin. I.e. when
writing e.g. a double width character in the last column, we insert a
CELL_SPACER+0 pad character, and then write the double width character
in the first column on the next row.
|
| | | |
|
| |\ \ |
|
| | | |
| | |
| | |
| | | |
Otherwise it may be stale when read by the anywhere() function.
|
| |\ \ \
| |_|/
|/| | |
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If the image was accompanied with a “Set Raster Attributes” (SRA)
command, make sure we *never* shrink the image below the size
specified in the SRA.
Images are normally shrunk when their bottom rows are fully
transparent. This enables sixels that aren’t a multiple of 6 to be
emitted, without also emitting an SRA command.
But if there *is* an SRA command, obey it.
Verified against XTerm-367
|
| |\ \
| |/
|/|
| | |
Closes #487
|
| | | |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Only enable XDG activation when compiling against wayland-protocols
1.21. Older versions don’t have this protocol.
When available, define HAVE_XDG_ACTIVATION.
Make all usages of xdg_activation_v1 and xdg_activation_token_v1
conditional.
|
| | | |
|
| | | |
|
| |/ |
|
| |\ |
|
| | |
| |
| |
| |
| | |
Instead of passing a `default_return` parameter, which is always
just the current state anyway.
|
| | | |
|
| |\ \
| |/
|/| |
|
| |/
|
|
|
|
|
|
| |
While skimming this doc, I noticed that "-Dterminfo" wasn't rendering
properly as it was lacking its closing backquote.
While at it, tweak the Arch wiki link, as it redirects to replace
/index.php with /title.
|