| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
| |
This fixes various crashes that occurred after a reflow due to the
sixel image list invariants no longer being true.
|
| |
|
|
|
| |
This ensures the overwrite is done when the scrollback history is in
the same state as when we then insert the new image.
|
| |
|
|
|
|
| |
When punching a hole in a sixel (and thus splitting it up into up to
four new sixels), use pixman to calculate the new sixel coordinates
and sizes.
|
| |
|
|
|
| |
Use pixman to calculate the intersection of the rectangle being
overwritten, and the sixel(s). Verify our code matches.
|
| |
|
|
| |
Verifies sixels have been scrolled out correctly
|
| | |
|
| | |
|
| |
|
|
| |
Branch tagged as ‘likely’ for performance reason
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The state after this function is an intermediate state and isn’t
necessarily valid.
This sixels needs to be ‘reflowed’ to ensure a valid state. This is
something that should be done by the caller after the text grid has
been reflowed and the sixel coordinates have been re-mapped to the new
grid.
TODO: can/should we update the sixel cols/rows in sixel_reflow()
instead?
|
| |
|
|
|
| |
This helps debug sixel overwrites, as it makes it more visible when
there are sixels that _should_ have been removed.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function loops the list of sixels, and discards those that would
be scrolled out if the grid offset is moved forward by the specified
number of rows.
The criteria is when the rebased row value is less than the number of
rows to scroll.
A rebased row number is a zero-based number starting at the beginning
of the scrollback. Thus, when scrolling 5 rows, rows with a rebased
row number between 0-4 will be scrolled out.
For performance reasons, we used to break out of the loop as soon as a
row number *larger* than the scroll count.
This however does not work. The sixels are sorted by their *end*
row. While this works in most cases (think images outputted in the
shell in the normal screen), it doesn’t always.
In the alt screen, where applications can print images just about
anywhere, it is possible to have *any* start row number anywhere in
the sixel list. Just as long as their *end* row numbers are sorted.
For example, a huuuge sixel that covers the entire scrollback. This
sixel will naturally be first in the list (and thus sixel_scroll_up()
will visit it *last*, since it iterates the list in reverse), but
should still be destroyed when scrolling.
|
| |
|
|
| |
This will make it easier when debugging assertions in this function.
|
| | |
|
| |
|
|
|
| |
This ensures the screen is updated correctly. Without this, the sixel
image would remain on screen until force-refreshed by some other means.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
| |
Move sixel reflow from grid_reflow() to sixel_reflow(). This lets us
use internal sixel functions to update the sixels.
Note that grid_reflow() still needs to remap the sixelss coordinates.
|
| |
|
|
|
| |
This fixes an issue where we resized+reflowed with bad rows/cols
values in the sixels.
|
| | |
|
| | |
|
| |
|
|
|
| |
This function should be called *after* the cell dimensions have
changed, but *before* resizing/reflowing the grids.
|
| |
|
|
|
| |
* Verify no sixel crosses the scrollback wrap-around
* Verify no sixels overlap
|
| |
|
|
|
|
| |
Also make sure to destroy sixels that are too big to fit in the scrollback.
Fixes issues with the sixel list not being sorted correctly.
|
| | |
|
| |
|
|
| |
Sixels may extend outside the visible screen area
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When a sixel image crosses the scrollback wrap-around, it is split up
into (at least) two pieces.
We use cursor->point.col for all pieces’ x-coordinate. This caused the
final image to appear sheared, since we do a carriage-return (after a
number of linefeeds) after each piece - this causes the cursor’s
position to be reset to the left margin.
The solution is simple; remember the cursor’s initial x-coordinate,
and use that to position all image pieces.
Closes #151.
|
| |
|
|
|
|
|
|
| |
This fixes a crash when the emitted sixel extends beyond the right
margin. The crash only happens when there are other sixel images
already emitted.
Fixes part of #151
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
When we detected an invalid section name, we correctly logged this and
warned the user.
However, the internal state machine now had an invalid section enum
value. This caused a crash when the next key/value pair was to be
parsed and we tried to lookup which parser function to call.
Closes #159.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Trackpad scroll movements are in pixels. Foot previously “translated”
these directly to line movements (i.e. a one pixel scroll event was
translated into a one line scroll).
Now we use the line height of the terminal and correctly convert
pixels to lines.
This makes the trackpad scroll speed in foot consistent with the
scroll speed in e.g. Alacritty and Kitty.
|
| | |
|
| |
|
|
|
|
| |
If the viewport is close to the bottom, but not *at* the bottom, and
we’re enlarging the window, the translated viewport will be too far
down.
|
| |
|
|
| |
Closes #142
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Doing so will schedule the renderer “as soon as possible”. I.e we’re
by-passing the regular scheduler, and thus we’re by-passing the user’s
setting of the delayed-render-* timers.
The fact that we’re scheduling “as soon as possible” also means we’re
much more likely to trigger flickering, or color flashes, if the
application is changing colors which are on the screen.
To handle changes to the cursor color(s), use the new
term_damage_cursor() instead of render_refresh().
To handle background color changes, which affect the margins, use the
new term_damage_margins() instead of render_refresh_margins(),
Closes #141
|
| | |
|
| |
|
|
|
|
|
|
|
| |
term_damage_cursor() damages the cell where the cursor is currently
at. This can be used to ensure the cursor is re-drawn, if there aren’t
any other pending updates.
term_damage_margins() requests the margins be redrawn the next time we
render the grid.
|
| |
|
|
|
|
|
|
|
|
|
| |
Allow a mouse binding to match even if its click count is less than
the actual click count.
If there are multiple bindings that match, use the one with the
highest click count (that less than, or equal to the actual click
count).
Closes #146
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
| |
This reverts commit 8f3692f9a662c69cadca1b840f22f4f222b550e9.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
An odd cell width/height sometimes resulted in an odd grid
size. Combined with a scaling factor of e.g. 2, that led to a rounding
error when converting pixel sizes to logical window sizes.
As a result, the _next_ configure event would cause us to loose a
pixel, which led to us dropping a row from the grid.
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| |
| | |
Closes #135
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
This option controls the initial state of the Alternate Scroll Mode,
and defaults to ‘enabled’.
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
The keycodes will change if the seat’s keymap changes. Make sure we
only do alternate scrolling if the seat has a keyboard, and use
the *current* layout’s keycodes for arrow up/down (instead of
the *first* layout’s).
|
| | | |
|
| |/ |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
The initial window size is set *before* we’re initially mapped. This
means we don’t (yet) know on which output we’ll be mapped. _That_
means we don’t know which scaling factor to use.
This implements a best effort attempt, where we use the “guessed”
scaling factor. This will always be correct in single-monitor
configurations, but may be wrong in multi-monitor setups with
different scaling factors.
|
| |
|
|
|
|
|
|
| |
Use the new fcft_set_scaling_filter() API to use a non-default scaling
filter.
By default, we use lanczo3, the ‘best’ filter. This overrides the
default in fcft, which is ‘cubic’ filtering.
|
| | |
|
| |\
| |
| |
| | |
Closes #128
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This deprecates/renames scrollback-up/down to scrollback-up/down-page.
It also renames scrollback-up/down-half to
scrollback-up/down-half-page, and adds the new bindings
scrollback-up/down-line.
|
| | |
| |
| |
| |
| |
| |
| |
| | |
These new bindings scroll up/down half a page in the
scrollback (instead of the full page scrolled by
‘scrollback-{up,down}’).
Closes #128.
|
| |\ \ |
|
| |/ / |
|
| |\ \ |
|
| |/ /
| |
| |
| |
| |
| |
| |
| | |
Even though we translate the cursor position from the old grid
coordinates to the new, the cursor may _still_ end up outside the
visible area.
Make sure it doesn’t.
|
| |\ \
| |/
|/| |
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| | |
Returns true when there is data available for paste in the
clipboard/primary selection.
|
| | |
| |
| |
| | |
These functions clear the current selection.
|
| |/ |
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add -W,--window-size-chars command line option
* Add initial-window-size-chars foot.ini option
* Add -w,--window-size-pixels command line option
* Add initial-window-size-pixels foot.ini option
* Deprecate -g,--geometry command line option in favor of
-w,--window-size-pixels
* Deprecate geometry option in foot.ini in favor of
initial-window-size-pixels
|