summaryrefslogtreecommitdiff
path: root/alacritty_terminal/src/term/mod.rs
AgeCommit message (Collapse)Author
2020-03-24Fix cursor position after alt screen resizeChristian Duerr
This fixes a regression introduced in 4cc6421, which ignored the main grid's cursor when increasing the number of lines available, causing incorrect cursor position after restoring to the primary screen. Additionally another similar bug has been fixed where the grid was not scrolled correctly when shrinking while in the alternate screen. When the grid is resized multiple lines at once, there was also an issue with Alacritty either pulling all lines from history or none at all, instead of mixing both approaches and pulling just what is required. This lead to incorrect cursor positions when the resize could partially make use of history. Fixes #3499.
2020-03-21Bump version to RC3v0.4.2-rc3Christian Duerr
2020-03-14Fix live config reload for window titleChristian Duerr
This enables live config reload for the window title. This includes updating the title after it has been pushed and popped from the title stack. The dynamic title option also isn't disabled automatically anymore when the title is set in the config. If the title is set from CLI, the behavior is unchanged and dynamic title changes are still disabled. If the dynamic title is disabled in the config, the title is still updated when the config title is changed. Dynamic title now only prevents changes to the UI's title.
2020-03-07Fix selection with invisible start and endChristian Duerr
This resolves an issue with the selection clamping, where no selection would be rendered at all when the start was above the viewport while the end was below it.
2020-03-01Remove `tabspaces` config optionChristian Duerr
This completely removes the tabspaces option from the Alacritty configuration, due to frequent misuse of it. Based on some research, none of the terminal emulators support setting the value for tabspaces or read the terminfo to determine init_tabs value at startup. The tested terminal emulators were URxvt, XTerm, and Termite.
2020-03-01Fix tabs across linewrapChristian Duerr
This resolves an issue with tabs not breaking across line boundaries, instead the characters would just all get written to the last column and thus be lost. It also tweaks the behavior of what happens when the terminal resizes with the default tabspaces changed, using something like the `tabs` program. Previously all tabstops would be reset to the default on resize, which is what URxvt does. Now the tabspaces are kept and the new columns are filled with the default tabstops, which emulates Termite.
2020-02-23Fix config reload updating incorrect gridChristian Duerr
2020-02-22Fix block selection including last columnChristian Duerr
The block selection will now only insert extra newline characters after each line if the last line isn't already included. This resolves an issue with duplicate newlines, since newlines are automatically appended when the last column is part of a selection. Fixes #3304.
2020-02-10Revert "Fix backspace deleting chars when IME is open"Christian Duerr
This reverts commit 7f4dce2ee04859fb0b48f15cf808b60065778703. Originally it was assumed that macOS always sends the \x7f on backspace anyways, however this is not true. It seems like the character on backspace can change even within the same terminal session, so we need to have our own binding to reliably set the correct binding. A solution for #1606 should be implemented in cooperation with winit.
2020-02-07Fix selection expansion across full-width glyphsChristian Duerr
Instead of trying to expand the start and end of a selection across full-width glyphs, the selection should now only go from its origin to the end without any kind of expansion. Instead, the expansion is now done where the cells are actually checked for their selection status, expanding across the entire full-width glyph whenever any part of it is selected. Fixes #3106.
2020-01-31Mirror OSC query terminatorChristian Duerr
Fixes #3091.
2020-01-26Fix incorrect grid.len() and grid.history_size()Kirill Chibisov
2020-01-21Fix first cell when selection is off screenChristian Duerr
Since the expansion of the selection was done after clamping it to the grid, the selection would incorrectly move the clamped start over by one cell when the start was to the right of the original column. By resetting the side of the start point to `Left` before expanding, this can be circumvented. This also resolves a regression which broke backwards bracket selection. Fixes #3223.
2020-01-20Remove scrolling.auto_scroll featureKirill Chibisov
Fixes: #1873
2020-01-15Expand line selection across wrapped linesChristian Duerr
2020-01-11Move Alacritty to organizationChristian Duerr
This fixes various outdated links pointing to the old jwilm/alacritty repository. Since `copypasta` now has its own github repository at https://github.com/alacritty/copypasta, the sources have been removed from Alacritty.
2020-01-09Fix cut off full width glyphs in last columnChristian Duerr
This resolves the issue with full width glyphs getting rendered in the last column. Since they need at least two glyphs, it is not possible to properly render them in the last column. Instead of rendering half of the glyph in the last column, with the other half cut off, an additional spacer is now inserted before the wide glyph. This means that the specific glyph in question is then three cells wide. Fixes #2385.
2019-12-24Fix screen reset not clearing cell flagsChristian Duerr
2019-12-21Fix Windows CI build failureChristian Duerr
2019-11-23Move renderer from alacritty_terminal to alacrittyKirill Chibisov
2019-11-18Fix deletion of lines when clearing the screenNathan Lilienthal
Previously Alacritty would delete lines when clearing the screen, leading to a loss of data in the scrollback buffer. Instead of deleting these lines, they are now rotated outside of the visible region. This also fixes some issues with Alacritty only resetting lines partially when the background color of the template cell changed. Fixes #2199.
2019-11-17Fix ESC escapes not ignoring invalid intermediatesKirill Chibisov
Previously, `ESC` escapes would ignore invalid intermediates and still execute the specified actions, leading to false positives. If there's an unexpected, intermediate specified now, the escape will be dropped. This also fixes an issue with `CSI Ps c` not dropping the escape with invalid intermediates.
2019-11-17Fix cell reset not clearing flags and foregroundKirill Chibisov
Fixes #2330.
2019-11-15Fix `CSI Ps M` deleting lines above cursorChristian Duerr
Fixes #2984.
2019-11-14Fix division by zero without any cols or linesBurak Yigit Kaya
The URL check uses a division to wrap column indices across lines, which will cause a runtime error if the size of the terminal is zero columns wide. Since a lot of our logic assumes that we at least have one column and line to work with and our behavior doesn't matter otherwise, this change fixes the terminal dimensions to have space for at least one cell.
2019-11-12Fix mouse modes not being mutually exclusiveKirill Chibisov
2019-11-11Add escape for reading clipboardChristian Duerr
2019-11-04Add UTF-8 mouse mode supportKirill Chibisov
Fixes #1934.
2019-11-04Fix incorrect cell foreground when clearing screenChristian Duerr
This fixes a bug that would clear the cells with the current template cell with just the `flags` reset, to make sure the colors are correct. However, the cell foreground was not reset, leading to cells counting as occupied when resizing. With this change both cell flags and foreground color are ignored when clearing both the whole screen and inside the line, allowing us to accurately keep track of cell occupation. Fixes #2866.
2019-11-03Fix URL highlightingChristian Duerr
Fixes #2898. Fixes #2479.
2019-10-15Add support for alternate scroll escapeAleksey Kuznetsov
Fixes #2727.
2019-10-14Add support for title stack escape sequencesDustin
This commit adds the concept of a "title stack" to the terminal. Some programs (e.g. vim) send control sequences `CSI 22 ; 0` (push title) and `CSI 23 ; 0` (pop title). The title stack is just a history of previous titles. Applications can push the current title onto the stack, and pop it back off (setting the window title in the process). Fixes #2840.
2019-10-05Update to winit/glutin EventLoop 2.0Christian Duerr
This takes the latest glutin master to port Alacritty to the EventLoop 2.0 rework. This changes a big part of the event loop handling by pushing the event loop in a separate thread from the renderer and running both in parallel. Fixes #2796. Fixes #2694. Fixes #2643. Fixes #2625. Fixes #2618. Fixes #2601. Fixes #2564. Fixes #2456. Fixes #2438. Fixes #2334. Fixes #2254. Fixes #2217. Fixes #1789. Fixes #1750. Fixes #1125.
2019-10-02Add live config reload for font sizewayne
2019-09-26Fix selection not inverting terminal backgroundChristian Duerr
Fixes a regression introduced in 9a0555bbba30c264f617ec9260ca00e0eab70870 where the terminal background would not get inverted when selected.
2019-09-26Fix cell opacity when color matches terminal bgKirill Chibisov
Commit e964af8 introduced a regression, where if cell's bg color was equal to NamedColor::Background rgb color it was rendered with transparent background. However the correct behavior is to render bg transparent only when bg color is actually a NamedColor::Background. Fixes #2814.
2019-09-26Fix overflow on wrong scroll region settingKirill Chibisov
Fixes #2822.
2019-09-09Reset the Mouse Cursor While SelectingNathan Lilienthal
This change disabled the mouse cursor and URL highlight (underline) while a selection is in progress. A click to clear the selection doesn't trigger a URL action, but will re-enable the URL highlighting to indicate the next click will trigger the launcher.
2019-08-24Show text cursor when pressing shift in mouse modeJohn Sullivan
Fixes #2550.
2019-08-03Move modifier check before URL searchChristian Duerr
This makes sure that the URL search is only initiated when all required modifiers are held down. This should improve performance with long URLs.
2019-08-01Switch to rfind_url for URL detectionChristian Duerr
This switches to rfind_url for detecting URLs inside the grid. Instead of expanding at the cursor position, the complete terminal is searched from the bottom until the visible region is left with no active URL. Instead of having the field `cur` publicly accessibly on the `DisplayIterator`, there are the two methods `DisplayIterator::point` and `DisplayIterator::cell` for accessing the current element of the iterator now. This allows accessing the current element right after creating the iterator. Fixes #2629. Fixes #2627.
2019-07-28Fix cursor flickering on url hoverKirill Chibisov
This commit fixes the regression introduced in 84aca67 and also fixes url highlight bounds computation when url ends on a last column. Fixes #2665.
2019-07-10Fix cursor color setting with escape sequenceKirill Chibisov
The cursor rework introduced a regression where cursor color was always picked from a config file, rather then using `ansi::NamedColor::Cursor` for this purpose. This commit also removes `CursorText` option from `NamedColor` enum, since we can't speculate with `CursorText` during runtime. Cursor rework commits: cfc20d4f34dca535654cc32df18e785296af4cc5 371d13f8ef95157c97f7de9964bcbc89d4a8e930 0d060d5d801e3abb55035269138d819d38fc175b
2019-07-08Change mouse cursor when hovering over the message barElaina Martineau
2019-06-23Fix performance issues with text reflowChristian Duerr
Fixes #2567. Fixes #2414.
2019-06-21Fix inconsitent cursor position when scrollingKirill Chibisov
This commit fixes regression introduced in cfc20d4f34dca535654cc32df18e785296af4cc5. `self.cursor.line` forced the cursor to hold a fixed location while scrolling until its "original" location (usually the shell prompt) went off the screen. So cursor position should be keep updated, which can be achieved by using `self.inner.line()`. Fixes #2570.
2019-06-20Add block selectionChristian Duerr
This implements a block selection mode which can be triggered by holding Control before starting a selection. If text is copied using this block selection, newlines will be automatically added to the end of the lines. This fixes #526.
2019-06-15Fix dynamic color escape responseChristian Duerr
The dynamic color escape response would answer to requests with rgb:0/0/0 when the color was completely black, instead of properly responding with double-digit hex colors. This has been changed so that Alacritty now always properly responds with the same number of hex digits for all colors. The number of digits has also been changed from two to four digits per color, since that is the more commonly used format. Using the `write!` macro was also causing problems with NeoVim, since it caused Alacritty to write the dynamic color escape in multiple write calls, switching to `write_all` fixed that. Fixes #2543.
2019-06-09Add wayland primary selection clipboard supportChristian Duerr
2019-06-06Fix index out of bounds during selectionChristian Duerr
This reworks the selection logic to prevent any possible index out of bounds exceptions by clamping the start and end points before doing anything else with them when converting selections to spans. This also fixes a bug where semantic selections would not automatically expand across double-width characters. Fixes #2486.