aboutsummaryrefslogtreecommitdiff
path: root/sixel.c (follow)
Commit message (Collapse)AuthorAgeLines
* sixel: unhook: tighten up the condition needed for us to free image data pre-maturelyDaniel Eklöf2021-04-18-5/+5
|
* sixel: sixel_fini(): free image dataDaniel Eklöf2021-04-18-0/+1
| | | | | Normally, this data is always free:d indirectly, when the sixel image that took over ownership is destroyed. But let’s play it safe.
* sixel: fix double free caused by bad free() in sixel_colors_set()Daniel Eklöf2021-04-18-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | sixel_color_set() is called when the number of (sixel) color registers is changed. It frees the current palette, and changes the “palette size” variable. Originally, we only had a single palette. This is the one free:d by sixel_color_set(). Later, we added support for private vs. shared palettes. With this change, we now have one palette that is “never” free:d (the shared one), and a private palette that is always free:d after a sixel has been emitted. ‘sixel.palette’ is a pointer to the palette currently in use, and should only be accessed **while emitting a sixel**. This is the pointer sixel_color_set() free:d. So for example, if ‘sixel.palette’ pointed to the shared palette, we’d free the shared palette. But, we didn’t reset ‘sixel.shared_palette’, causing a double free later on. Closes #427
* sixel: free backing buffer if final image size is zeroDaniel Eklöf2021-03-28-0/+5
|
* sixel: initialize max_non_empty_row_no to -1, not 0Daniel Eklöf2021-03-28-3/+7
| | | | | | | | | | | | | 0 is a perfectly valid row number, and if max_non_empty_row_no==0, that means we have *1* sixel row, and after trimming the image, the image will have a height of 6 pixels. If the sixel sequence is empty (or at least doesn’t emit any non-empty pixels), then trimming the image should result in an image height of 0. When max_non_empty_row_no is initialized to -1, it will still have that value in unhook(), which makes the final image height 0.
* term: runtime switch between a ‘fast’ and a ‘generic’ ASCII print functionDaniel Eklöf2021-03-16-0/+7
| | | | | | | | | | | | | | | | | | | | | | | term_print() is called whenever the client application “prints” something to the grid. It is called for both ASCII and UTF-8 characters, and needs to handle sixels, insert mode and ASCII vs. graphical charsets. Since it’s on the hot path, this becomes unnecessarily slow. This patch adds a “fast” version of term_print(), tailored for the common case: ASCII characters in non-insert mode, without any sixels and non-graphical charsets. A new function, term_update_ascii_printer(), has been added, and must be called whenever: * The currently selected charset *index* changes * The currently selected charset changes (from ASCII to graphical, or vice verse) * Sixels are added to the grid * Sixels are removed from the grid * Insert mode is enabled/disabled
* sixel: sixel_overwrite_at_cursor(): early exit when the image list is emptyDaniel Eklöf2021-03-14-0/+3
| | | | | | | | This avoids a call to sixel_overwrite_by_row() (where we also exit early if the image list is empty). This saves a couple of instructions to set up the arguments for sixel_overwrite_by_row().
* sixel: max geometry should be max geometry, not current window sizeDaniel Eklöf2021-03-14-2/+2
| | | | | | | | | “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.
* sixel: implement P2=1 - transparent pixelsDaniel Eklöf2021-03-11-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | When P2=1, empty pixels are transparent. This patch also changes the behavior of P2=0|2, from setting empty pixels to the default background color, to instead use the *current* background color. To implement this, a couple of changes are needed: * Sixel pixels always use alpha=1.0, except for *empty* cells when P2=1 (i.e. transparent pixels). * The renderer draws sixels with the OVER operator, instead of the SRC operator. * The renderer *must* now render the cells beneath the sixel. As an optimization, this is only done for sixels where P2=1. I.e. for fully opaque sixels, there’s no need to render the cells beneath. The sixel renderer isn’t yet hooked into the multi-threaded renderer. This means *rows* (not just the cells) beneath maybe-transparent sixels are rendered single-threaded. Closes #391.
* sixel: decgra: set max-non-empty-row-no when resizing the imageDaniel Eklöf2021-03-11-0/+1
| | | | | | | | | | | | | This ensures we don’t trim off bottom rows in unhook(). This could happen either because the application used “Set Raster Attributes” to configure an image size larger than the sixels later emitted. Or, the last sixel row contains empty pixel rows. In either case, the size set with “Set Raster Attributes” defines the *minimum* image size; the image may still end up being larger.
* sixel: decgri: handle a repeat count of 0, by ignoring itDaniel Eklöf2021-03-11-2/+11
|
* sixel: add: add sixel_add_many(), improving performance of DECGRIDaniel Eklöf2021-03-11-24/+27
| | | | | | | | | | | DECGRI, i.e. repeat sixel character, only need to do image resizing, and updating the current ‘column’ value *once*. By adding sixel_add_many(), and doing the size/resize checking there, the performance of sixel_add() is made much simpler. This boosts performance quite noticeably when the application is emitting many and/or long repeat sequences.
* sixel: add: calculate absolute row no inside the loopDaniel Eklöf2021-03-11-2/+3
| | | | | | This results in the same number of instructions inside the loop, with a ‘lea’ instead of a ‘mov’, but simplifies the post-loop logic to update the global state.
* sixel: add: increase data pointer instead of offsetDaniel Eklöf2021-03-11-3/+3
| | | | | Same ‘add’ instruction to increase the offset, but simpler ‘mov’ instruction when writing the pixel data.
* sixel: decgri: avoid load inside for-loopDaniel Eklöf2021-03-11-1/+2
|
* sixel: add optimized resize_horizontally() and resize_vertically()Daniel Eklöf2021-03-11-2/+78
| | | | | The resize operations performed in the “hot” path either change the width, or the height, but not both at the same time.
* sixel: empty pixels in the last sixel row doesn’t contribute to the image heightDaniel Eklöf2021-03-11-1/+17
| | | | | | | | | | | | | | All-empty pixels rows in the last sixel row should not be included in the final sixel image. This allows applications to emit sixels whose height is not a multiple of 6, and is how XTerm works. This is done by tracking the largest row number that contains non-empty pixels. In unhook, when emitting the image, the image height is adjusted based on this value.
* sixel: resize: width is no longer a multiple of 6Daniel Eklöf2021-03-11-16/+4
|
* sixel: set ‘col’ outside image boundaries when we’ve reached max heightDaniel Eklöf2021-03-11-3/+13
| | | | | | | | | | | | | | This is to optimize sixel_add(). It already checks ‘pos’, to see if it needs to resize the image, and if the resize fails (either due to allocation failures, or because we’ve reached the maximum width), we bail out. We need to do the same thing for height. But, we don’t want to add another check to sixel_add() since its’s performance critical. By setting ‘col’ outside the image boundaries when ‘row’ reaches the maximum image height, we can “re-use” the existing code in sixel_add().
* sixel: remove ‘max_col’Daniel Eklöf2021-03-11-12/+3
| | | | The image width *is* the maximum number of columns we’ve seen.
* sixel: adjust image height when processing ‘-’Daniel Eklöf2021-03-11-8/+8
|
* sixel: resize: check new width/height against max geometry earlyDaniel Eklöf2021-03-11-9/+9
|
* Revert "sixel: resize: always round up height to a multiple of 6"Daniel Eklöf2021-03-11-4/+6
| | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5a9d70da837c20a9641d6cbadccc962a8e5a4283. This broke jexer. Comparing with what XTerm does, we can see that it updates its image height for *each* pixel in *each* sixel. I.e. empty pixels at the bottom of a sixel will not increase the image size. Foot currently bumps the image height 6 pixels at a time, i.e. always a whole pixel. Given this, always rounding up the height to the nearest multiple of 6 (say, for example, when responding to a DECGRA command), is wrong. Now, we use the image size specified in DECGRA as is, while still allowing the image to grow beyond that if necessary. What’s left to do, if we want to behave *exactly* like XTerm, is stop growing the image with 6 pixels at a time when dynamically adjusting the image size.
* sixel: add: use de-reference the term struct for each access to the backing imageDaniel Eklöf2021-03-11-7/+10
|
* sixel: get rid of an ‘imul’ in sixel_add()Daniel Eklöf2021-03-11-2/+4
| | | | | | | | By storing the current row’s byte offset into the backing image in the terminal struct. This replaces the ‘imul’ with a load, which can potentially be slow. But, this data should already be in the cache.
* sixel: add: resize is already checking against the current max geometryDaniel Eklöf2021-03-11-6/+0
|
* sixel: resize: don’t resize beyond the current max geometryDaniel Eklöf2021-03-11-0/+14
|
* sixel: unhook: make sure image height is within boundsDaniel Eklöf2021-03-11-0/+4
| | | | | | | | When we allocate the backing buffer, the number of allocated rows is a multiple of 6. When persisting the image, make sure its height does not exceed the current maximum height.
* sixel: add: simplify check for resize neededDaniel Eklöf2021-03-11-1/+1
| | | | | Since the image height is always a multiple of 6, there’s no need to round up the image height.
* sixel: resize: always round up height to a multiple of 6Daniel Eklöf2021-03-11-6/+4
| | | | Sixels are always a multiple of six.
* sixel: fixup row is multiple of 6Daniel Eklöf2021-03-11-1/+1
|
* sixel: calculate alpha when updating the paletteDaniel Eklöf2021-03-11-9/+6
| | | | | Calculate color, with alpha, when updating the palette instead of every time we *use* the palette.
* sixel: pre-calculate color before calling sixel_add()Daniel Eklöf2021-03-11-3/+11
| | | | | This improves performance of DECGRI, since we now only need to calculate the color once for the entire repeat sequence.
* sixel: ignore invalid sixel characters in DECGRI (repeat)Daniel Eklöf2021-03-11-1/+11
|
* sixel: avoid multiplication inside the inner sixel emitter loopDaniel Eklöf2021-03-11-6/+6
|
* sixel: store current row position in pixels, not charactersDaniel Eklöf2021-03-11-6/+5
|
* sixel: size provided by DECGRA does *not* limit the sixel sizeDaniel Eklöf2021-03-06-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Foot has, up until now, used a fixed image size when the application used DECGRA (Raster Attributes) to “configure” the image size. This was based on a misunderstanding, that this was how you emitted sixels where the height was *not* a multiple of 6. This isn’t the case. The VT340 documentation is actually pretty clear about this: Ph and Pv do not limit the size of the image defined by the sixel data. However, Ph and Pv let you omit background sixel data from the image definition and still have a color background. They also provide a concise way for the application or terminal to encode the size of an image. This is also how XTerm behaves. Test image: \EPq "1;1;1;1 #0;2;0;0;0#1;2;100;100;0#2;2;0;100;0 #1~~@@vv@@~~@@~~$ #2??}}GG}}??}}??- #1!14@ \E\ This uses DECGRA to set the image size to 1x1. The sixel however is *not* clipped to 1x1, but is resized to 14x12
* sixel: don’t go past the bottom scroll margin when sixel scrolling is disabledDaniel Eklöf2021-02-26-1/+1
| | | | | | | | When sixel scrolling is disabled (private mode 80 is off), and scroll margins have been set, XTerm seems to ignore the top margin (sixel still begins at (0,0)), but does not go past the bottom margin. This patch implements the same behavior in foot.
* sixel: implement private mode 80 - sixel scrollingDaniel Eklöf2021-02-26-38/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* sixel: implement private mode 8452 - cursor positioning after sixelDaniel Eklöf2021-02-23-2/+22
| | | | | | | | | | 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
* sixel: free private color registers on unhookDaniel Eklöf2021-02-23-11/+6
|
* sixel: implement private mode 1070 - private color paletteDaniel Eklöf2021-02-23-6/+26
| | | | | | | | | 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
* debug: rename assert() to xassert(), to avoid clashing with <assert.h>Craig Barnes2021-01-16-35/+35
|
* Print stack trace on assert() failure or when calling fatal_error()Craig Barnes2021-01-16-0/+1
| | | | | | Note: this uses the __sanitizer_print_stack_trace() function from the AddressSanitizer runtime, so it only works when AddressSanitizer is in use.
* Add xsnprintf() and remove some unnecessary strlen(3) callsCraig Barnes2021-01-14-8/+9
|
* sixel: current geometry: don’t exceed current window dimensionsDaniel Eklöf2021-01-14-1/+2
| | | | | This is similar to what XTerm does, and fixes an issue with lsix, where the output did not wrap.
* sixel: change default max size to 10000x10000Daniel Eklöf2020-11-23-26/+8
| | | | | It used to be the size of the window. This caused images to be cropped when the application emitting them didn’t change the max size.
* sixel: fix crash when an explicit sixel size had a height less than 6 pixelsDaniel Eklöf2020-11-23-4/+1
|
* hsl: add our own implementations of rgb-to-hsl and hsl-to-rgbDaniel Eklöf2020-11-15-9/+28
| | | | | | | | | | | | | | | | | | | | | | | * New function: rgb_to_hsl() * New function: hsl_to_rgb() * Replace XTerm’s hls_to_rgb() with our own, hsl_to_rgb(). * Ensure hue/lum/sat values are within range before calling hsl_to_rgb() Note that sixels’ use the following primary hues: * blue: 0° * red: 120 * green: 240° While “standard” HSL uses: * red: 0° * green: 120° * blue: 240° Thus, we need to adjust the sixel’s hue value before calling hsl_to_rgb().
* render: improve sixel rendering performanceDaniel Eklöf2020-11-13-2/+13
| | | | | | | | | | | | | | | | | | Up until now, we’ve always re-rendered the entire image (the part of it that is visible at least), *every* time we render a frame. This is not really needed. In many cases, the cells covered by the image hasn’t been touched. Rewrite the sixel rendering code to only render the part of the sixel image that covers dirty cells. This is done on a per-row basis. I.e. Each *row* of the image that covers at least one dirty cell is re-rendered. For this to work, we now also dirty all cells covered by the image when we emit the image. Finally, for this to work, the sixels need to be rendered *before* we do the normal grid render pass (since that will clear all dirty bits).
* sixel: reflow: drop sixels that crosses the scrollback history’s endDaniel Eklöf2020-10-09-0/+23
| | | | | This fixes various crashes that occurred after a reflow due to the sixel image list invariants no longer being true.
* sixel: unhook: do overwrite *after* linefeedingDaniel Eklöf2020-10-09-2/+5
| | | | | This ensures the overwrite is done when the scrollback history is in the same state as when we then insert the new image.
* sixel: overwrite: use pixman to calculate new the sixel boundariesDaniel Eklöf2020-10-09-75/+74
| | | | | | 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.
* sixel: ovewrite-by-rectangle: in debug builds, cross-reference against pixmanDaniel Eklöf2020-10-09-2/+38
| | | | | Use pixman to calculate the intersection of the rectangle being overwritten, and the sixel(s). Verify our code matches.
* sixel: verify scrollback consistency: new verify functionDaniel Eklöf2020-10-09-0/+26
| | | | Verifies sixels have been scrolled out correctly
* sixel: add comments to verify_*() functionsDaniel Eklöf2020-10-09-0/+23
|
* sixel: verify-*: don’t return anything; rely on asserts onlyDaniel Eklöf2020-10-09-18/+7
|
* sixel: scroll up/down: early return when list is emptyDaniel Eklöf2020-10-09-0/+6
| | | | Branch tagged as ‘likely’ for performance reason
* sixel: cell-size-changed: don’t verify sixels hereDaniel Eklöf2020-10-09-2/+0
| | | | | | | | | | | | | 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?
* sixel: unhook: look total number of sixelsDaniel Eklöf2020-10-09-0/+3
| | | | | This helps debug sixel overwrites, as it makes it more visible when there are sixels that _should_ have been removed.
* sixel: scroll-up: don’t break out early of loopDaniel Eklöf2020-10-09-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* sixel: verify-list-order: add an ‘index’ variableDaniel Eklöf2020-10-09-0/+4
| | | | This will make it easier when debugging assertions in this function.
* sixel: overwrite-by-rectangle: assert sixels don’t cross scrollback wrap-aroundDaniel Eklöf2020-10-09-4/+7
|
* sixel: scroll: call sixel_erase() instead of sixel_destroy()Daniel Eklöf2020-10-09-2/+2
| | | | | This ensures the screen is updated correctly. Without this, the sixel image would remain on screen until force-refreshed by some other means.
* sixel: TOOD -> TODO (fixes codespell build error)Daniel Eklöf2020-10-09-1/+1
|
* sixel: verify-no-overlap: free pixman regionsDaniel Eklöf2020-10-09-0/+5
|
* sixel: verify-no-overlap: initialize ‘intersection’ pixman regionDaniel Eklöf2020-10-09-0/+1
|
* sixel: unhook: only call render_refresh() onceDaniel Eklöf2020-10-09-2/+3
|
* sixel: implement reflowDaniel Eklöf2020-10-09-0/+48
| | | | | | | 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.
* sixel: verify-sixels: check for bad list order lastDaniel Eklöf2020-10-09-2/+2
|
* sixel: verify-no-wraparound-crossover: fix calculation of ‘end’ rowDaniel Eklöf2020-10-09-1/+1
|
* sixel: add sixel_cell_size_changed()Daniel Eklöf2020-10-09-0/+24
| | | | | This function should be called *after* the cell dimensions have changed, but *before* resizing/reflowing the grids.
* sixel: debug: more fine-grained verification of sixel image listDaniel Eklöf2020-10-09-5/+63
| | | | | * Verify no sixel crosses the scrollback wrap-around * Verify no sixels overlap
* sixel: overwrite: calculate split-up image pieces’ rows/cols from their width/heightDaniel Eklöf2020-10-09-8/+3
|
* sixel: overwrite: remove assertsDaniel Eklöf2020-10-09-12/+1
| | | | Sixels may extend outside the visible screen area
* sixel: fix sheared image when image crosses scrollback wrap-aroundDaniel Eklöf2020-10-09-1/+11
| | | | | | | | | | | | | | | 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.
* sixel: overwrite-by-rectangle expects ‘width’ to not exceed screenDaniel Eklöf2020-10-09-1/+2
| | | | | | | | 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
* sixel: fold long lineDaniel Eklöf2020-10-09-1/+3
|
* Don't use "case X ... Y:", if possible/where it makes senseDaniel Eklöf2020-08-23-4/+16
|
* Cast printf formatter %p arguments to void*Daniel Eklöf2020-08-23-1/+1
|
* don't use empty struct initializersDaniel Eklöf2020-08-23-1/+1
|
* Convert most dynamic allocations to use functions from xmalloc.hCraig Barnes2020-08-08-8/+9
|
* sixel: remove sixel-to-be-splitted *before* splitting itDaniel Eklöf2020-07-23-4/+8
| | | | | This fixes an assertion in debug builds, due to the pre-splitted and splitted sixels overlapping.
* sixel: overwrite: use target sixel's height, not cell heightDaniel Eklöf2020-07-23-2/+2
| | | | | | | When copying the image data for the left and right parts of the splitted images, use the sixel's height, not the cell height. This fixes a crash when the sixel didn't cover the entire cell height.
* sixel: verify list order: fix assertion when two sixels are on the same rowDaniel Eklöf2020-07-16-2/+22
| | | | | Two sixel may in fact exist on the same row, assuming their columns don't overlap.
* term: rename term_formfeed() -> term_carriage_return()Daniel Eklöf2020-07-14-1/+1
|
* sixel: overwrite_by_row: handle case where 'width' goes past end of rowDaniel Eklöf2020-07-07-1/+4
| | | | Cap 'width' to maximum number of columns available.
* Merge branch 'master' into sixel-performanceDaniel Eklöf2020-06-29-0/+11
|\
| * sixel: destroy all sixels when font size is decreasedDaniel Eklöf2020-06-29-0/+11
| | | | | | | | | | | | If changing the font size causes the cell size to decrease, either horizontally or vertically (or both), then delete all sixels since the grid space they allocated no longer is enough to hold the images.
* | scroll: destroy scrolled out sixels before scroll is appliedDaniel Eklöf2020-06-29-127/+55
| | | | | | | | | | | | | | | | | | | | | | | | The logic that breaks out of sixel loops does not work for rows that has already wrapped around. Thus, we need to destroy sixels that are about to be scrolled out *before* we actually scroll. Since this is the *only* time we destroy sixels (instead of overwriting it), rename the sixel functions. And, since they now do a very specific thing, they can be greatly simplified (and thus faster).
* | sixel: overwrite-by-rectangle: optimize: break out of loop as soon as possibleDaniel Eklöf2020-06-28-0/+18
| | | | | | | | | | | | | | | | | | Since the images are sorted, we can break out of the loop as soon as we detect an image that *ends before* the rectangle's top starts. In order for the row comparisons to work, the row numbers must be re-based against the current scrollback offset, or the scrollback *end*, to be precise.
* | sixel: overwrite-by-row: optimize: break out of loop as soon as possibleDaniel Eklöf2020-06-28-14/+24
| | | | | | | | | | | | | | | | | | Since the images are sorted, we can break out of the loop as soon as we detect an image that *ends before* the row we're looking for. In order for the row comparisons to work, the row numbers must be re-based against the current scrollback offset, or the scrollback *end*, to be precise.
* | sixel: overwrite: pass 'width' to sixel_overwrite_at_cursor()Daniel Eklöf2020-06-28-2/+2
| | | | | | | | This is necessary to handle multi-column characters correctly.
* | sixel: insert: calculate end rows in a single statementDaniel Eklöf2020-06-28-8/+21
| |
* | sixel: insert: sort sixels such that those furthest up in the scrollback is at the backDaniel Eklöf2020-06-28-0/+19
| |
* | sixel: add local function sixel_insert()Daniel Eklöf2020-06-28-2/+8
|/ | | | Replace all tll_push_*() calls with calls to this function.
* sixel: split -> overwriteDaniel Eklöf2020-06-27-15/+15
|
* term: erasing characters now splits sixels instead of deleting themDaniel Eklöf2020-06-27-12/+22
|
* sixel: delete/split: early(ier) exit when there aren't in sixel imagesDaniel Eklöf2020-06-27-9/+16
| | | | Avoid unnecessary wrap checks if the sixel image list is empty.
* sixel: split: make pixman instantiation genericDaniel Eklöf2020-06-27-34/+27
|