aboutsummaryrefslogtreecommitdiff
path: root/alacritty/src
Commit message (Collapse)AuthorAge
* Fix selection rotation on the last lineChristian Duerr2023-03-24
| | | | | | | | | | | | | This fixes an issue with terminal resizes when the selection is on the last line. Alacritty would fail to rotate lines and keep the selection in the same line index whenever the terminal line count was grown or shrunk. This issue occurred due to the range passed to the selection's rotate function still being based on the old terminal size, which caused the initial or target state of the rotation to be outside of the terminal bounds. Closes #6698.
* Fix `;` character in URI OSC 8 payloadKirill Chibisov2023-03-19
| | | | | The special character `;` can be not URL-encoded, thus it'll add extra parameter in the payload. Handle it joining extra parameters with the `;` as a separator.
* Fix busy rendering when the same warning persistsKirill Chibisov2023-03-02
| | | | | | When the same warning is thrown on the each rendering iteration, it'll force alacritty to always render. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Send D&D input through paste actionChristian Duerr2023-02-27
| | | | Treating D&D like paste allows using D&D to input text into areas other than the PTY, like the search bar.
* Fix bracketed paste with EOT payloadChristian Duerr2023-02-23
| | | | | This works around an issue in many (all?) shells where the bracketed paste logic would only strip out `\r` but interpret EOT (`\x03`) as a termination of the bracketed paste.
* Relax horizontal scrollingKirill Chibisov2023-02-19
| | | | | | Apply horizontal scrolling when the angle between the axis X and (x, y) vector is lower than 25 degrees. Fixes #6711.
* Add `window.resize_increments` config optionKirill Chibisov2023-02-18
| | | | Given how bugged the resize increments are on X11, it's better to disable it by default.
* Add touch input supportChristian Duerr2023-02-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch builds upon the prior work by @4z3 and @bytbox to add touchscreen support to Alacritty. While some inspiration was taken from @4z3's patch, it was rewritten from scratch. This patch supports 4 basic touch interactions: - Tap - Scroll - Select - Zoom Tap allows emulating the mouse to enter a single LMB click. While it would be possible to add more complicated mouse emulation including support for RMB and others, it's likely more confusing than anything else and could conflict with other more useful touch actions. Scroll and Select are started by horizontal or vertical dragging. While selection isn't particularly accurate with a fat finger, it works reasonably well and the separation from selection through horizontal and vertical start feels pretty natural. Since horizontal drag is reserved for selection we do not support horizontal scrolling inside the terminal. While it would be possible to somewhat support it by starting a selection with vertical movement and then scrolling horizontally afterwards, it would likely just confuse people so it was left out. Zoom is pretty simple in just changing the font size when a two-finger pinch gesture is used. Performance of this is pretty terrible especially on low-end hardware since this obviously isn't a cheap operation, but it seems like a worthwhile addition since small touchscreen devices are most likely to need frequent font size adjustment to make output readable. Closes #3671.
* Don't send ESC for `OptionAsAlt::None`Kirill Chibisov2023-02-12
| | | | This doesn't solve issue for `RALT`/`LALT`, but that part is impossible until winit's keyboard v2 API.
* Fix crash when Atlas is fullKirill Chibisov2023-02-11
| | | | | This fixes the regression introduced by 2d27fff. Fixes #6688.
* Make gles2 renderer actually gles2Kirill Chibisov2023-02-07
| | | Fixes #6209.
* Align quadrants with half blocks in built-in fontKirill Chibisov2023-02-05
| | | Fixes #6201.
* Revert "Apply 'font.glyph_offset.y' for underline/strikeout"Kirill Chibisov2023-02-05
| | | This reverts commit d5e9d1d88317afc1f4374f2c2a7679cece14cb7b.
* Resize the window by cell dimensionsKirill Chibisov2023-02-05
| | | | | | This should resize window by cell dimensions granularity instead of using pixels. Fixes #388.
* Fix notify doing active pollingKirill Chibisov2023-02-02
| | | | | | | | | | The `notify-debouncer-mini` spawn a thread which checks the events every timeout, which is not desired since we want to avoid active polling. This commit re-implements debouncer based on the `RecommendedWatcher` without adding an extra thread on top and not doing any busy-waiting. Fixes #6652.
* Update winit to 0.28Kirill Chibisov2023-02-02
| | | | | | | | Fixes #6644. Fixes #6615. Fixes #6558. Fixes #6515. Fixes #3187. Fixes #62.
* Create new windows with Cmd+N by defaultChristian Duerr2023-01-27
| | | | | | | | This changes the default Cmd+N binding on macOS to create a new window rather than spawning a new instance. Initially this change was held back for further testing of the multi-window feature. At this point all significant issues found with it have been fixed so it should be ready for prime-time now.
* Add support for horizontal scrollingKirill Chibisov2023-01-16
| | | | | | This adds support for horizontal mouse scrolling in mouse mode and alternative scrolling modes. Fixes #2185.
* Use sRGB color space for NSWindow on macOSNaru2023-01-07
| | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
* User timer based rendering instead of vsyncKirill Chibisov2022-12-30
| | | Fixes #824.
* Fix crash when one dimension of the window is zeroKirill Chibisov2022-12-30
| | | | | | This fixes a crash on Windows when the user resizes the window to the point that it has the height of zero. The crash was introduced by the glutin update, since it requires non-zero sizes for the resize.
* Disable depth and stencil buffersChristian Duerr2022-12-29
| | | | | | | | | This patch reduces the active GPU memory consumption by disabling the depth and stencil buffers. During original testing it reduced GPU memory usage on Linux by almost a third. This is a reintroduction of previously reverted patch 3475e44. Closes #2881.
* Apply 'font.glyph_offset.y' for underline/strikeoutKirill Chibisov2022-12-25
| | | Fixes #6561.
* Add -T short form for --titleJames McCoy2022-12-11
| | | | | | | | | | | | Debian-based distributions provide a standard interface to launch a terminal via the x-terminal-emulator name. In order for a terminal emualtor to satisfy that interface, it must * Be VT100 compatiable * Support the "-e <command> <args>" CLI option * Support the "-T <title>" CLI option Adjust the short form of --title accordingly, providing -t as an alias to avoid breaking any existing usage.
* Fix damage computation on boundariesKirill Chibisov2022-12-09
| | | | | Given that the Rect started to use signed integers saturating_sub became irrelevant and no clamp to zero were performed. This commit uses max instead to fix it.
* Ignore errors from swap_buffersKirill Chibisov2022-12-02
| | | | | | | | Most of them are innocent and require just swap again. It was like that before anyway due to old glutin bug in the error handling implementation where errors won't pulled on swap buffers, but old observed error was used. Fixes #6538.
* Add 'debug.renderer' config optionKirill Chibisov2022-11-28
| | | | | This should help trouble shooting the renderer being created and different renderer options to determine when something like dual-source rendering isn't working.
* Fix padding update not updating rendererChristian Duerr2022-11-28
| | | | | | | This fixes an issue where it was possible to update the padding of the terminal without actually queueing an update for the renderer projection, leading to a blurry projection. Closes #6502.
* Update to notify v5 via notify_debouncer_miniJames McCoy2022-11-15
| | | | | | | | Notify v5 moved the debounced API into the notify_debouncer_mini crate. The debounced API doesn't provide details on the type of event that happened, just that a list of events or errors happened. Therefore, reload is triggered on any event for a matching path. Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Fix cursor visibility with focus change on macOSChris Copeland2022-11-11
| | | Fixes #6452.
* Update glutin to 0.30.0Kirill Chibisov2022-11-03
| | | | | | | | | | | | | | | The glutin 0.30.0 update decouples glutin from winit which provides us with basis for a multithreaded renderer. This also improves robustness of our configuration picking, context creation, and surface handling. As an example we're now able to start on systems without a vsync, we don't try to build lots of contexts to check if some config works, and so on. That also brings us possibility to handle context losses, but that's a future work. Fixes #1268.
* Fix crash with very low font sizesKirill Chibisov2022-10-21
| | | Fixes #6432.
* Fix cursor and underlines always being blackKirill Chibisov2022-10-21
| | | | | | | Some old hardware doesn't like universal shader approach for all the rectangle kinds leading to ALU instruction limits. This commit fixes it by splitting the shader per rectangle kind. Fixes #6417.
* Fix `--help` output for `--class` to match man pagesAndrzej Grzeslak2022-10-18
| | | | | | The output of --help did not match the man pages with regards to the ordering of arguments for the --class flag. This has now been fixed. Fixes #6413.
* Fix clippy warningsChristian Duerr2022-10-12
| | | | | This patch applies all clippy lints currently present on the latest clippy master than are compatible with our oldstable clippy (only exception is the `_else(||` stuff).
* Fix icon decoding on X11Hugal312022-10-05
| | | | | Glutin is waiting for an RGBA buffer with 8-bit depth, but our icon is 16-bit depth. So we need to normalize the color data when decoding the icon.
* Migrate from winapi to windows-syskillian2022-09-30
|
* Fix IPC config overriding previous valuesChristian Duerr2022-09-17
| | | | | | | | | | | | | | Before this patch whenever changing the IPC configuration, all previous configuration options would be discarded. This was the case even when the new option was invalid. This patch ensures that the IPC config is only ever cleared when the `--reset` flag is passed. Invalid IPC config options are logged and discarded. Additionally whenever a new IPC config message is sent, all previous IPC error messages are cleared. Closes #6330.
* Bump winit to 0.27.3Kirill Chibisov2022-09-15
| | | | Fixes #6324. Fixes #6313.
* Avoid text cursor location for hyperlink previewKirill Chibisov2022-09-14
| | | Fixes #6325.
* Don't enable multisamplingKirill Chibisov2022-09-11
| | | | | It never worked in the first place, because we were never requesting it in glutin, and it provides no value given that textures are already antialiased.
* Add IPC config subcommandChristian Duerr2022-09-01
| | | | | | | | | | | | | | | | | | | | This patch adds a new mechanism for changing configuration options without editing the configuration file, by sending options to running instances through `alacritty msg`. Each window will load Alacritty's configuration file by default and then accept IPC messages for config updates using the `alacritty msg config` subcommand. By default all windows will be updated, individual windows can be addressed using `alacritty msg config --window-id "$ALACRITTY_WINDOW_ID"`. Each option will replace the config's current value and cannot be reset until Alacritty is restarted or the option is overwritten with a new value. Configuration options are passed in the format `field.subfield=value`, where `value` is interpreted as yaml. Closes #472.
* Add inline input method supportKirill Chibisov2022-08-29
| | | | | | This commit adds support for inline IME handling. It also makes the search bar use underline cursor instead of using '_' character. Fixes #1613.
* Rework `--class` CLI optionKirill Chibisov2022-08-25
| | | | | | | | | This commit swaps the order of `general` and `instance` arguments and also sets `instance` to `general` when only one argument was provided. This should make this option behave like in other terminals on X11, since they set either both or general by default, but not instance like Alacritty. Fixes #6279.
* Include extra directory in crateChristian Duerr2022-08-24
| | | | | | | | | | | | | Instead of having the extra symlink in the root, this puts the symlink in the alacritty crate. Since we build the package on Linux this is not a problem and even allows us to get rid of the `alacritty.png` symlink. To avoid having complicated symlinks with regards to the windows build assets directory, it has just been removed from the `extra` directory completely. Since we only need it for building, it doesn't matter where it's located and users will never have to interact with it manually anyway. Closes #6242.
* Fix general and instance class set on window (#6276)Ulrik de Muelenaere2022-08-20
| | | | This fixes a regression introduced in 7d708d5, which caused the general and instance class to be swapped.
* Use `WindowEvent::Occluded` to hint renderingtrimental2022-08-11
| | | | This should prevent rendering on macOS and X11 to invisible windows.
* Bump glutin to 0.29.1Kirill Chibisov2022-08-10
| | | | | | | | Fixes #6239. Fixes #5975. Fixes #5876. Fixes #5767. Fixes #4484. Fixes #3139.
* Warn if only columns XOR lines is setSabu Siyad2022-08-02
| | | Co-authored-by: Christian Duerr <contact@christianduerr.com>
* Fix visible regex match on tall viewportsPeter DeLong2022-07-26
| | | | | | The end of the search window is currently calculated using the viewport start instead of the end. The observed behavior is that all hinting stops suddenly after line 101. This was introduced in #6139 when the code was refactored into this file from display/content.rs.