aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeLines
* meson/pkgbuild: bump version to 1.7.11.7.1Daniel Eklöf2021-03-28-2/+2
|
* changelog: prepare for 1.7.1Daniel Eklöf2021-03-28-9/+3
|
* Merge branch 'master' into releases/1.7Daniel Eklöf2021-03-28-262/+463
|\
| * Merge branch 'search-treat-empty-cells-as-spaces'Daniel Eklöf2021-03-28-0/+4
| |\
| | * changelog: spaces matches empty cells in scrollback search modeDaniel Eklöf2021-03-28-0/+1
| | |
| | * search: when matching cell content, treat empty cells as spacesDaniel Eklöf2021-03-28-0/+3
| | |
| * | Merge branch 'sixel-trimming'Daniel Eklöf2021-03-28-3/+13
| |\ \ | | |/ | |/|
| | * changelog: empty sixels resulted in non-empty imagesDaniel Eklöf2021-03-28-0/+1
| | |
| | * 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.
| * Merge branch 'pgo-clang-11'Daniel Eklöf2021-03-28-54/+118
| |\ | | | | | | | | | Closes #418
| | * meson: replace log+debug+xmalloc static libraries with a single ‘common’ libraryDaniel Eklöf2021-03-27-7/+9
| | | | | | | | | | | | | | | | | | | | | There are cyclic dependencies between the log, debug and xmalloc libraries. While having them as separate static libraries work, as long as consumers of them link against all of them, having them in a single library feels slightly better.
| | * changelog: updated PGO build instructionsDaniel Eklöf2021-03-26-0/+5
| | |
| | * install: clang-11.x compatible PGO instructionsDaniel Eklöf2021-03-26-11/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LLVM/Clang 11.x throws errors for _files_ without any profiling data: error: ../../async.c: Function control flow change detected (hash mismatch) async_write Hash = 72057641800614222 [-Werror,-Wbackend-plugin] This caused multiple issues with the current PGO instructions: * The `pgo` binary failed to link with `meson configure -Db_pgo=use` when doing a full PGO build (since it isn't used in this case); * `footclient` fails to link for the same reason. * `foot` fails to link for the same reason in **partial** PGO builds. The solution is to make sure all binaries that are built in the final phase (`-Db_pgo=use`) have been executed in the _generate_ phase. Doing this also means we can drop `-Wno-missing-profile` and friends. Also add `--sixel` to the `generate-alt-random-writes` command line in the description for a full PGO build. Closes #418
| | * install: add ‘llvm’ as an optional build dependencyDaniel Eklöf2021-03-26-0/+1
| | | | | | | | | | | | It is needed for PGO builds with Clang.
| | * PKGBUILD: do PGO with either gcc or clang, but nothing elseDaniel Eklöf2021-03-26-22/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this, we assumed gcc was being used. The build would fail if clang (or something else) was used. Now, we check whether we’re compiling with gcc or clang, and disable PGO if it’s neither of them. Furthermore, we’re now adding the necessary flags needed to do PGO with clang. Note that ‘llvm-profdata’, from the ‘llvm’ package is needed for PGO:ing with clang. PGO is disabled if it isn’t available. It would be nice to have ‘llvm’ as an optional make dependency, but PKGBUILDs doesn’t appear to support such a thing. Finally, the -Wno-missing-profile flag, and its friends, have been removed; instead we execute “footclient --version” (and “foot --version”, in partial PGO builds) to ensure all generated binaries have been executed before we do the final build (with -Db_pgo=use). This fixes build failures with clang >= 11.x.
| | * meson: only build the pgo helper binary when -Db_pgo=generateDaniel Eklöf2021-03-26-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the only time it’s needed. In non-PGO builds, it is completely unnecessary, and we’re only wasting CPU cycles building it. In full PGO builds, with -Db_pgo=use, we get link warnings and/or failures, depending on compiler, since the pgo binary hasn’t been executed.
| | * meson: build source files common to both foot and footclient as librariesDaniel Eklöf2021-03-26-10/+9
| | | | | | | | | | | | | | | Source files used by both foot and footclient are now compiled as static libraries, which foot and footclient links against.
| | * features: --version now logs +/-pgoDaniel Eklöf2021-03-26-4/+20
| | | | | | | | | | | | That is, whether the binary was compiled with PGO or not.
| * | readme: dpi & fonts: focus on *current* behaviorDaniel Eklöf2021-03-27-13/+14
| |/ | | | | | | | | | | | | | | | | The text was describing the original behavior, where output scaling was completely ignored, and tacked on a “btw, starting with foot-1.6...”. Now, simply describe the current behavior, and be more clear about _how_ dpi-aware can be changed.
| * Merge branch 'buffer-size-multiple-of-scale-factor'Daniel Eklöf2021-03-25-19/+53
| |\ | | | | | | | | | Closes #409
| | * changelog: sub-surface sizes not a multiple of the scaling factorDaniel Eklöf2021-03-25-0/+4
| | |
| | * render: make sure surface buffer sizes are a multiple of the scaling factorDaniel Eklöf2021-03-25-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The buffer attached to a surface with wl_surface_attach() must have a width and height that both are a multiple of the scale configured for that buffer: The new size of the surface is calculated based on the buffer size transformed by the inverse buffer_transform and the inverse buffer_scale. This means that at commit time the supplied buffer size must be an integer multiple of the buffer_scale. If that's not the case, an invalid_size error is sent. Due to a libwayland bug[^1], this is currently *not* being reported as an error. However, recent versions of Sway have started enforcing this, and is e.g. dropping (not rendering) sub-surfaces that does not adhere to this. [^1]: https://gitlab.freedesktop.org/wayland/wayland/-/issues/194 Closes #409
| | * render: render_osd(): no need to pass width/height as parametersDaniel Eklöf2021-03-25-8/+8
| |/ | | | | | | | | | | All uses of render_osd() passes buf->width/buf->height as width/height. Thus, we can simply remove the width/height parameters and have render_osd() use buf->width and buf->height directly.
| * Merge branch 'sixel-deadlock'Daniel Eklöf2021-03-25-2/+3
| |\
| | * render: draw sixels before taking the render worker lockDaniel Eklöf2021-03-25-2/+3
| |/ | | | | | | | | | | | | This fixes a possible deadlock; render_sixels_images() may call render_cell(), which may need to take the worker lock (when rendering either a blinking cell, or a box drawing glyph that isn’t yet in the glyph cache).
| * Merge branch 'per-seat-ime-state'Daniel Eklöf2021-03-25-146/+199
| |\ | | | | | | | | | | | | Closes #411 Closes #324
| | * ime: set ‘have_warned = true’ to avoid warning over and over againDaniel Eklöf2021-03-25-0/+1
| | |
| | * changelog: don’t crash upon receiving text-input::enter without keyboard focusDaniel Eklöf2021-03-25-0/+3
| | |
| | * ime: log warning on text-input::done() received without keyboard focusDaniel Eklöf2021-03-25-0/+9
| | |
| | * ime: don’t enable IME if we don’t have keyboard focusDaniel Eklöf2021-03-25-8/+4
| | | | | | | | | | | | Closes #411
| | * ime: don’t pass ‘term’ to ime_update_cursor_rect()Daniel Eklöf2021-03-25-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | In all instances where we call ime_update_cursor_rect(), the ‘term’ argument is the same as seat->kbd_focus. So, let ime_update_cursor_rect() use that directly instead. Also make ime_send_cursor_rect() static (i.e. local to ime.c).
| | * ime: codespell: actaually -> actuallyDaniel Eklöf2021-03-25-1/+1
| | |
| | * ime: move preedit state from terminal struct to the seat structDaniel Eklöf2021-03-25-135/+177
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ensures different seat’s don’t step on each others IME pre-edit state. It also removes most dependencies on having a valid term pointer for many IME operations. We’re still not all the way, since we support disabling IME with a private mode, which is per terminal, not seat. Thus, we still require the seat to have keyboard focus on one of our windows. Closes #324. But note that *rendering* of multiple seat’s IME pre-edit strings is still broken.
| * Merge branch 'clear-linebreak-flag-when-printing'Daniel Eklöf2021-03-25-0/+4
| |\ | | | | | | | | | Closes #410
| | * changelog: newlines incorrectly inserted into copied textDaniel Eklöf2021-03-23-0/+2
| | |
| | * term: term_print(): clear line break flagDaniel Eklöf2021-03-23-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The line break flag is used by the text reflow and text extraction (i.e. copy-paste) logic, to determine whether or not to insert a newline between two lines. There’s some amount of heuristics involved in this. For example, the client application could emit a newline, move the cursor back up, and print text. What does that mean for us? Foot’s behavior up until now has been this: The line break flag is set on the row, when the application emits an explicit linefeed. The flag is cleared when the line is erased. But otherwise not. This meant that emitting a linefeed and then moving the cursor back up and printing text, did not clear the line break flag. This in turn meant that text copied always had newlines inserted, even though that was not the client applications intention. By clearing the line break flag whenever _anything_ is printed to a row, the new behavior is, in practice, that the line break flag is only set on a row if a linefeed was that *last* thing printed to that row. Closes #410
| * Merge branch 'zoom-line-height'Daniel Eklöf2021-03-21-8/+22
| |\
| | * term: increase/decrease custom line-height with font size changesDaniel Eklöf2021-03-21-8/+22
| |/ | | | | | | | | | | | | | | When the user has set a custom line-height, we now adjust it when increasing/decreasing (“zooming”) the font size at run-time. Previously, the line-height was fixed at the size specified in foot.ini.
| * Merge branch 'match-all-required-modifiers-before-unshifting-symbol'Daniel Eklöf2021-03-21-1/+6
| |\ | | | | | | | | | Closes #407
| | * input: must have all required modifiers to un-shift a symbolDaniel Eklöf2021-03-21-1/+6
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When detecting, and repairing, “broken” key bindings (where the key binding itself explicitly lists a modifier that is consumed by the final symbol - e.g “Shift+W”), don’t just look for an intersection between the set of modifiers needed to produce the final symbol, and the modifiers listed in the key combo. Instead, check if the key combo has *all* the required modifiers. Example: Shift+AltGr+w produces Page_Down. I.e. Page_Down is the _shifted_ symbol, ‘w’ is the un-shifted symbol, and Shift+AltGr are the modifiers required to shift ‘w’ to Page_Down. If we have the key combo Shift+Page_Down, foot would, correctly, determine that Page_Down is a shifted symbol. It would find the Shift+AltGr modifier set, and since the intersection of “Shift+AltGr” and “Shift” (from our key combo) is non-empty, foot would (incorrectly) determine that we can, and should, replace Page_Down with its un-shifted symbol ‘w’. This is completely wrong, since Shift+w does _not_ produce Page_Down. Closes #407
| * doc: benchmark: update "workstation" benchmarks with 1.7.0 resultsDaniel Eklöf2021-03-20-8/+8
| |
| * doc: benchmark: updated “laptop” benchmark with 1.7.0 resultsDaniel Eklöf2021-03-20-8/+8
| |
| * changelog: add new ‘unreleased’ sectionDaniel Eklöf2021-03-20-0/+11
| |
| * Merge branch 'releases/1.7'Daniel Eklöf2021-03-20-6/+5
| |\ | |/ |/|
* | changelog: 1.7.01.7.0Daniel Eklöf2021-03-20-4/+3
| |
* | meson/pkgbuild: bump version to 1.7.0Daniel Eklöf2021-03-20-2/+2
|/
* Merge branch 'add-bash-completions'Daniel Eklöf2021-03-17-0/+164
|\ | | | | | | Closes #10
| * Add: Bash completion for foot and footclientSimon Schricker2021-03-17-0/+164
|/ | | | | | | * use toe for terminfo, thanks Craig. * adds optional dependency on bash-completion for positional arguments Co-authored-by: Craig Barnes <craigbarnes@protonmail.com>
* Merge branch 'optimized-print-function'Daniel Eklöf2021-03-16-16/+95
|\
| * csi: update ASCII printer function pointer when switching to/from alt screenDaniel Eklöf2021-03-16-0/+1
| | | | | | | | | | This is necessary since switching screen may change how many sixels we have in the scrollback.
| * term: update_ascii_printer(): log when we (actually) switch printerDaniel Eklöf2021-03-16-1/+11
| |
| * term: runtime switch between a ‘fast’ and a ‘generic’ ASCII print functionDaniel Eklöf2021-03-16-16/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | config: open_config(): remove unused argument ‘conf’Daniel Eklöf2021-03-16-2/+2
|/
* Merge branch 'term-print-assume-col-can-be-incremented'Daniel Eklöf2021-03-16-4/+4
|\
| * term: term_print(): assume we’re *not* at the right marginDaniel Eklöf2021-03-14-4/+4
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That is, assume we can, and should, increment the cursor column. This changes the emitted assembly from: 518fb: 8b 8b f8 05 00 00 mov 0x5f8(%rbx),%ecx 51901: ff c9 dec %ecx 51903: 39 d1 cmp %edx,%ecx 51905: 7e 11 jle 51918 <term_print.constprop.0+0x78> 51907: ff c2 inc %edx 51909: 89 50 10 mov %edx,0x10(%rax) 5190c: 5b pop %rbx 5190d: 5d pop %rbp 5190e: 41 5c pop %r12 51910: c3 ret 51911: 0f 1f 80 00 00 00 00 nopl 0x0(%rax) 51918: c6 40 18 01 movb $0x1,0x18(%rax) 5191c: 5b pop %rbx 5191d: 5d pop %rbp 5191e: 41 5c pop %r12 51920: c3 ret To: 5191c: 41 8d 50 01 lea 0x1(%r8),%edx 51920: 89 50 10 mov %edx,0x10(%rax) 51923: 3b 93 f8 05 00 00 cmp 0x5f8(%rbx),%edx 51929: 0f 8d 21 01 00 00 jge 51a50 <term_print.constprop.0+0x190> 5192f: 5b pop %rbx 51930: 5d pop %rbp 51931: 41 5c pop %r12 51933: c3 ret ... 51a50: c6 40 18 01 movb $0x1,0x18(%rax) 51a54: 44 89 40 10 mov %r8d,0x10(%rax) 51a58: 5b pop %rbx 51a59: 5d pop %rbp 51a5a: 41 5c pop %r12 51a5c: c3 ret I.e. it cuts the normal path from 10 instructions down to 8. It increases the "bad" path with one extra instruction.
* 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().
* Merge branch 'sixel-fix-max-geometry'Daniel Eklöf2021-03-14-2/+4
|\
| * sixel: max geometry should be max geometry, not current window sizeDaniel Eklöf2021-03-14-2/+4
| | | | | | | | | | | | | | | | | | “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.
* | Merge branch 'option-no-wait'Daniel Eklöf2021-03-14-41/+114
|\ \ | |/ |/| | | Closes #395
| * add changelog entry, completions and man entry for -N, --no-waitFelipe Trzaskowski2021-03-13-0/+8
| |
| * fix code style issues and memory leakFelipe Trzaskowski2021-03-13-13/+8
| |
| * add option to detach the client process from the terminal instanceFelipe Trzaskowski2021-03-13-42/+112
| |
* | scripts: generate-alt-random: reduce number of emitted sixelsDaniel Eklöf2021-03-14-1/+1
| | | | | | | | | | | | After emitting multiple color bands for each sixel row, the increased amount of sixel data shifted the balance in the profiling data, causing a performance regression in regular ASCII handling.
* | Merge branch 'drain-pty-when-client-terminates'Daniel Eklöf2021-03-13-10/+3
|\ \ | |/ |/|
| * term: don’t close PTY when client application diesDaniel Eklöf2021-03-12-10/+3
|/ | | | | | | | | Closing it as soon as we detect that the client has died, means we may not have drained it completely. The PTY is either closed _by_ the client application, or by us when we shutdown the terminal. Thus, leaving it open (until we call term_shutdown()) is fine.
* client: repair usage outputDaniel Eklöf2021-03-12-2/+2
|
* client: remove excess ‘-’ from ‘--log-level’ in usageDaniel Eklöf2021-03-12-1/+1
|
* changelog: sixel decoding performance improvementsDaniel Eklöf2021-03-12-0/+1
|
* Merge branch 'sixel-background-and-transparency'Daniel Eklöf2021-03-12-50/+98
|\ | | | | | | Closes #391
| * changelog: implemented DCS parameter P2Daniel Eklöf2021-03-11-0/+5
| |
| * render: sixels: render cursor, if it’s partially covered by an opaque sixelDaniel Eklöf2021-03-11-1/+3
| |
| * sixel: implement P2=1 - transparent pixelsDaniel Eklöf2021-03-11-50/+91
|/ | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'sixel-optimize'Daniel Eklöf2021-03-11-64/+217
|\
| * changelog: empty pixel rows at the bottom of a sixel is now trimmedDaniel Eklöf2021-03-11-0/+1
| |
| * 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.
| * generate-alt-random: sixel: emit at least 4 color bandsDaniel Eklöf2021-03-11-1/+1
| | | | | | | | | | | | This fixes an issue where there was a relatively high chance of not emitting any color bands at all, causing the final image size to be too small.
| * generate-alt-random: DECGRI: don’t emit zero-length repeat sequencesDaniel Eklöf2021-03-11-3/+3
| |
| * generate-alt-random: DECGRI: random repeat lengthsDaniel Eklöf2021-03-11-1/+5
| |
| * generate-alt-random: don’t skip that last partial rowDaniel Eklöf2021-03-11-2/+3
| |
| * generate-alt-random: emit “Set Raster Attributes” before color definitionsDaniel Eklöf2021-03-11-4/+4
| |
| * generate-alt-random: 50% chance of overwriting the last sixelDaniel Eklöf2021-03-11-6/+14
| |
| * generate-alt-random: emit sixels on the alt screenDaniel Eklöf2021-03-11-2/+5
| |
| * generate-alt-random: emit multiple sixel bandsDaniel Eklöf2021-03-11-10/+17
| | | | | | | | This ensures we’re getting the ‘$’ command PGO:d
| * sixel: decgri: handle a repeat count of 0, by ignoring itDaniel Eklöf2021-03-11-2/+11
| |
| * generate-alt-random: sixel: pan/pad must not be 0Daniel Eklöf2021-03-11-1/+1
| |
| * 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/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-13/+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/+5
| | | | | | | | | | | | | | | | 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.