Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Sixel support Fixes alacritty#910 * Implementation of the XTSMGRAPHICS sequence. * Don't clear cells after the right side of the graphic. * Don’t erase text behind a sixel image; the image might be transparent We still add a reference to the graphic in the first cell of every line under the image, but we don’t erase any of the text in any of the cells. * remove an unncessary variable from insert_graphic * Avoid unnecessary clone when set graphic data. * Define MAX_GRAPHIC_DIMENSIONS as a 2-elements array. * support DECSET/DECRST (CSI ? Pm h) to change where the cursor ends up after printing a sixel image. The default is for the cursor to be moved to the first column of the line after the image. When we receive CSI ? 8452 h, we will instead leave the cursor on the last line of the image, on the next column past the end of the image. * put the TermMode back to just u32; I had miscounted the bits * move_forward takes a relative column count, not an absolute column number * Interprets mode 80 as Sixel Display Mode. This is reverse of the *sixel scrolling* option, which should match the actual behaviour of DEC terminals. For reference: alacritty#4763 (comment) * Fill all cells under a graphic with the template. With the template we can create hyperlinks attached to the graphic. To avoid reflow issues when a row is shrank, wrapped rows that only contain graphic cells are discarded. With this approach we loss some info, like the hyperlink, but the image is always properly positioned in the grid. * Allow hue values up to 360 in the Sixel parser. * Allow replacing part of a graphic with text. When text is added to a cell with a reference to a graphic, an operation is sent to the OpenGL thread to replace a subregion of the cell with a transparent area. If the OpenGL driver supports the GL_ARB_clear_texture extension, the region is updated with glClearTexSubImage. If the extension is not available, the texture is updated with glTexSubImage2D. * Highlight graphics to show hints. Similar to the underline line rendered when the cursor is over an hyperlink, for graphics we now render a border around the graphic. * Allow overlapping graphics. If a graphic is added over another one, the implementation now checks if new graphic has transparent pixels in every cell. If so, the graphic is appended to the cell, instead of replacing the previous one. SmallVec is used to prevent heap allocation when the cell only contains a single graphic. This should be the most common scenario. The GPU will store up to 100 textures. If another texture is added when there are 100, the oldest one is deleted. * Optimize graphics replacement. A simple optimization for inserting graphics is to detect when a new graphic is replacing completely an existing one. If both graphics have the same size, and the new one is opaque, we can assume that the previous graphic will not be displayed anymore, so it is not considered when update the graphics list in a single cell. This commit also adds serde implementation for GraphicsCell. This was used to debug the new logic. * Fix clippy warnings. * Use hls_to_rgb implementation from libsixel. * Changes in sixel module to be compatible with oldstable. - Reimplement abs_diff(). - Use positional arguments to format the error message in assert_color!(). * Initialize cell dimensions when create a Graphics instance. This fixes a bug that crashes the terminal when a graphic is added before resizing the window. * Support GLES2 Renderer in sixel * Set graphics limit per cell. The limit per grid is increased to `1000`, and a new limit per cell is added, set to `20`. * Add Eq derive to ClearSubregion. Suggested by clippy. * CSI XTSMGRAPHICS Pi=2, Pa=1 should return dimensions that fit in text area * Remove entry about Sixel support in the changelog. * Update damage when a graphics is inserted. * Apply rustfmt to term/mod.rs. * Apply rustfmt and clippy to the current branch. * Serialize/Deserialize only if the `serde` feature is set. * Apply clippy suggestions. * Include Sixel support in Device Attributes response. The response for `\e[c` (Send Device Attributes) now returns level 2 with the Sixel extension. The other extensions are 6 (Selectively Erasable Characters) and 22 (Color Text). The values are documented in page 04-19 of DEC-STD-070. * Upgrade vte fork. With `$ cargo update vte`. * Use the published vte-graphics crate, instead of a Git repository. * Fix sixels position when padding>0 * Bump MSRV to 1.74.0 * Bump dependencies Update winit and clap to latest versions. * Document options which are not working everywhere yet This includes `window.position` and `window.resize_increments`. * Restart config monitor on import change This patch checks the hash of the import paths on every config change and restarts the config monitor whenever the current monitor's hash diverges from the updated config's list of imports. Closes alacritty#7981. * Unify string formatting * Fix description in alacritty-bindings(5) Man pages use the man page name as the first word in description. This also aligns with other man pages we have. * Make `ConPty` creation fallible * Remove duplicate clip-path from logo * Update checkout CI action * Improve TermMode bitflags initialization * Make alacritty(1) config paths resemble alacritty(5) This also fixes the escaping in alacritty(5) page. * Ignore cursor color request with default colors Currently when the cursor colors are requested for the default cursor color, Alacritty always responds with #000000. Since this is most likely incorrect, this response is misleading. Realistically there's very little reason why any application would need to know the color of the (often dynamically changing) default cursor. So instead of always reporting an incorrect black value, this patch just stops reporting values unless the cursor color was explicitly changed. Closes alacritty#8169. * Fix fullwidth semantic escape characters Semantic escape characters occupying two two grid cells were always skipped over, making it impossible to have functional fullwidth characters as part of semantic escape characters. This patch fixes this by only skipping over fullwidth spacer cells, rather than skipping those cells entirely. Closes alacritty#8188. * Fix app icon in alt+tab view on Windows * Move root config fields to `[general]` section Some users struggle with TOML, since root options must always be at the top of the file, since they're otherwise associated with the last table. To avoid misunderstandings, all root-level fields have been removed. A new `general` section was added to allow housing configuration options that do not fit into any more specific groups. Closes alacritty#7906. * Add migration support for TOML config changes This patch allows running `alacritty migrate` to automatically apply configuration changes made to the TOML format, like moving `ipc_socket` to `general.ipc_socket`. This should reduce the friction of moving around individual options significantly, while also persisting the format of the existing TOML file thanks to `toml_edit`. The YAML migration has been simplified significantly to only switch the format of the file from YAML to TOML. The new TOML features are used for everything else. * Restructure message bar log message The first line is not really useful for the user, so move it to the bottom. * Remove startup notify variables only for shell This will prevent issues when `setup_env` from `alacritty_terminal` will remove potentially useful variables for users of the library. Fixes alacritty#8202. * Remove unused `Clone` requirements * Fix highlight invalidation on grid scroll This fixes an issue where hints highlighted by vi or mouse cursor would produce an underline on the incorrect line since the highlights only store the initial match boundaries without accounting for new content scrolling the terminal. To accurately invalidate the hint highlights, we use existing damage information of the current frame. The existing logic to damage hints for the next frame to account for removal has been changed, since the hints would otherwise be cleared immediately. Instead we now mark the terminal as fully damaged for the upcoming frame whenever the hints are cleared. Closes alacritty#7737. * Change ctrl+shift+u to ctrl+shift+o Avoid collisions with IMEs by using ctrl+shift+o. ctrl+shift+u is bound to open unicode input in a lot of IMEs by default meaning that users won't ever see the url hints UI. * Add unicode 16 support This fixes issues in width calculation for symbols added in Unicode version 16. Since the upstream unicode-width crate has not been updated yet, this makes use of the temporary unicode-width-16 version to support Unicode 16 with Alacritty 0.14.0. * Fix panic on missing general config section Fixes alacritty#8230. * Alacritty version 0.14.0-rc1 * Implement multi-char cursor highlight Use `end` of the cursor to draw a `HollowBlock` from `start` to `end`. When cursor covers only a single character, use `Beam` cursor instead of `HollowBlock`. Fixes alacritty#8238. Fixes alacritty#7849. * Add IME support to inline search This changes the behavior of inline search from only accepting direct key inputs, to also accepting IME and paste. The additional characters are still being discarded, matching the existing behavior. This also fixes an issue where inline search wouldn't work for characters requiring modifiers, since the modifier press was interpreted as the search target instead. Closes alacritty#8208. * Add headless mode This patch adds a daemon mode to Alacritty which allows starting the Alacritty process without spawning an initial window. While this does not provide any significant advantage over the existing behavior of always spawning a window, it does integrate nicer with some setups and is a pretty trivial addition. * Remove dbg! in migration command * Alacritty version 0.14.0-rc2 * Fix pipe FD leak on X11 The pipe was not using O_CLOEXEC, so it was leaked into the child. Fixes alacritty#8249. * Revert "Add unicode 16 support" This reverts commit 5dca7a8. * Do not pull serde without serde feature alacritty_terminal was pulling `serde` via vte even though serde feature was disabled. * Alacritty version 0.14.0 * Use the GitHub CLI client to upload release assets. The binary for Linux is also added to the release. The `contents: write` permission is needed to create releases and upload the assets. * Clear compiler warnings * Add missed token for asset upload script --------- Co-authored-by: Ayose <[email protected]> Co-authored-by: Daniel Brooks <[email protected]> Co-authored-by: kumattau <[email protected]> Co-authored-by: Manuel de Prada <[email protected]> Co-authored-by: Kirill Chibisov <[email protected]> Co-authored-by: Christian Duerr <[email protected]> Co-authored-by: Hamir Mahal <[email protected]> Co-authored-by: 张小白 <[email protected]> Co-authored-by: philomathic_life <[email protected]> Co-authored-by: Dimitri Sabadie <[email protected]> Co-authored-by: Neil Stewart <[email protected]> Co-authored-by: Nathan Lilienthal <[email protected]> Co-authored-by: YizhePKU <[email protected]>
- Loading branch information