Commit Graph

15 Commits

Author SHA1 Message Date
Christian Duerr c84cd0fdb0
Fix first cell when selection is off screen
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-21 00:56:10 +01:00
Christian Duerr 3fb631b91c
Fix cut off full width glyphs in last column
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.
2020-01-09 23:06:41 +00:00
Kirill Chibisov 5aaa350e1a Update outdated reftests 2020-01-04 23:55:10 +00:00
Kirill Chibisov 44037fa42a Fix crash on clear when scrolled up in history
Fixes #3112.
2019-12-22 11:05:19 +00:00
Christian Duerr 36185c4753
Fix colored row reset performance
This fixes a bug where a row would always get reset completely if its
background does not equal the default terminal background. This leads to
big performance bottlenecks when running commands like `echo "\e[41m" &&
yes`.

Instead of resetting the entire row whenever the template cell is not
empty, the template cell is now compared to the last cell in the row.
The last cell will always be equal to the previous template cell when
`row.occ < row.inner.len()` and if `occ` is equal to the row's length,
the entire row is always reset anyways.

Fixes #2989.
2019-12-10 00:35:13 +01:00
Nathan Lilienthal 182a9d5c2e Fix deletion of lines when clearing the screen
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-18 22:15:25 +01:00
Christian Duerr b47a88b142
Fix URL highlighting
Fixes #2898.
Fixes #2479.
2019-11-03 21:59:28 +01:00
Christian Duerr 729eef0c93
Update to winit/glutin EventLoop 2.0
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-05 02:29:26 +02:00
Christian Duerr 5f7fb4c3e2
Fix url highlight not showing with required modifiers 2019-08-26 18:11:36 +02:00
Christian Duerr 5a40149069
Move modifier check before URL search
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-03 13:19:33 +00:00
Christian Duerr 9dddf649a1
Switch to rfind_url for URL detection
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-08-01 15:37:01 +00:00
Christian Duerr c4d2725e14
Fix row occ not set during new and reset
Since ref tests were only stored whenever winit requested the window
close, they would not get stored properly when the terminal was closed
through Alacritty using `exit`, Ctrl+D or similar.

This moves the ref test code to the and of the main entry point, which
will always be executed regardless of how the terminal was shutdown.

Fixes #2613.
2019-07-10 21:17:20 +00:00
Christian Duerr f002171c84
Fix performance issues with text reflow
Fixes #2567.
Fixes #2414.
2019-06-23 23:29:01 +00:00
JDTX 2c462c7d03 Fix spelling mistakes 2019-04-28 21:42:43 +00:00
Theodore Dubois dbd8538762 Split alacritty into a separate crates
The crate containing the entry point is called alacritty, and the crate
containing everything else is called alacritty_terminal.
2019-04-28 13:24:58 +00:00