Commit Graph

25 Commits

Author SHA1 Message Date
Kirill Chibisov 8bd2c13490
Add option to run command on bell
Fixes #1528.
2020-07-10 22:32:44 +03:00
Christian Duerr 46c0f352c4
Add regex scrollback buffer search
This adds a new regex search which allows searching the entire
scrollback and jumping between matches using the vi mode.

All visible matches should be highlighted unless their lines are
excessively long. This should help with performance since highlighting
is done during render time.

Fixes #1017.
2020-07-09 21:45:22 +00:00
Christian Duerr 87e5b1aa25
Add automatic scrolling during selection
This adds a new `Scheduler` which allows for staging events to be
processed at a later time.

If there is a selection active and the mouse is above or below the
window, the viewport will now scroll torwards the direction of the
mouse. The amount of lines scrolled depends on the distance of the mouse
to the boundaries used for selection scrolling.

To make it possible to scroll while in fullscreen, the selection
scrolling area includes the padding of the window and is at least 5
pixels high in case there is not enough padding present.
2020-06-18 01:02:56 +00:00
Christian Duerr 7aafbb757d
Remove copyright notice from files
Keeping the license as part of every file bloats up the files
unnecessarily and introduces an additional overhead to the creation of
new modules.

Since cargo already provides excellent dependency management, most of
the code-reuse of Alacritty should occur through Rust's dependency
management instead of copying it source.

If code is copied partially, copying the license from the main license
file should be just as easy as copying from the top of the file and
making some adjustments based on where it is used is likely necessary
anyways.
2020-06-06 21:49:14 +03:00
Christian Duerr 1dacc99183
Refactor Term/Grid separation
This commit aims to clear up the separation between Term and Grid to
make way for implementing search.

The `cursor` and `cursor_save` have been moved to the grid, since
they're always bound to their specific grid and this makes updating
easier.

Since the selection is independent of the active grid, it has been moved
to the `Term`.
2020-05-30 20:45:44 +00:00
Kirill Chibisov a14c51797f
Fix build warnings on macOS/Windows 2020-05-27 14:46:52 +00:00
Casper Rogild Storm ab1f173ccd
Add subpixel anti-aliasing support on macOS 10.14+ 2020-05-17 21:14:13 +00:00
Christian Duerr 81ce93574f
Extend style guideline documentation 2020-05-05 22:50:23 +00:00
Kirill Chibisov 04f0bcaf54
Use frame callbacks instead of vsync on Wayland
Instead of blocking on vsync, Alacritty now requests a notification from
wayland about when the next frame should be rendered. this helps with
input latency, since it gives alacritty more time to process events
before a redraw. it also prevents alacritty from drawing unless the
compositor tells it to do so.

Fixes #2851.
2020-05-03 23:29:11 +00:00
Kirill Chibisov 38d20d0c39
Call glFinish right after swap_buffers on X11
On X11 `swap_buffers` does not block for vsync. However the next OpenGl command
will block to synchronize (this is `glClear` in Alacritty), which causes a
permanent one frame delay.

Calling `glFinish` after swapping buffers forces Alacritty to finish the buffer
swap before returning control to the event loop.

Fixes #3061.
2020-05-01 20:57:25 +00:00
Kirill Chibisov 33abfe34a8
Add config option to set cursor thickness
Fixes #3526.
2020-04-15 03:50:34 +00:00
Kirill Chibisov f14d24542c
Fix various mouse mode + vi mode interactions
This commit fixes some issues introduced by
1a8cd172e520e493bacc9c6a2ae6f80de086eaa3:

 1. Vi cursor not moving properly on double/triple click
 2. URL not launching via mouse click in vi mode + mouse mode
 3. Ability to select in mouse mode with double/triple click regardless
    of shift modifier
2020-04-10 21:23:50 +03:00
Christian Duerr 1a8cd172e5
Add modal keyboard motion mode
This implements a basic mode for navigating inside of Alacritty's
history with keyboard bindings. They're bound by default to vi's motion
shortcuts but are fully customizable. Since this relies on key bindings
only single key bindings are currently supported (so no `ge`, or
repetition).

Other than navigating the history and moving the viewport, this mode
should enable making use of all available selection modes to copy
content to the clipboard and launch URLs below the cursor.

This also changes the rendering of the block cursor at the side of
selections, since previously it could be inverted to be completely
invisible. Since that would have caused some troubles with this keyboard
selection mode, the block cursor now is no longer inverted when it is at
the edges of a selection.

Fixes #262.
2020-03-18 02:35:08 +00:00
Christian Duerr c2c8d6bf37
Move Alacritty to organization
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-11 02:23:13 +01:00
Christian Duerr c34ec12c30
Bump glutin to 0.22.0
Fixes #3165.
2020-01-10 01:51:37 +00:00
Christian Duerr dc063180f3
Fix macOS OpenGL context resize ordering
Fixes #2226.
2020-01-04 00:19:06 +00:00
sterlingjensen 05df4f4dba Replace deprecated Error methods 2020-01-03 00:17:22 +00:00
Kirill Chibisov 6478ccaaa3 Fix high startup time on wlroots compositors 2019-12-31 16:53:27 +00:00
Kirill Chibisov 474032742b Move renderer from alacritty_terminal to alacritty 2019-11-23 18:08:52 +01:00
Burak Yigit Kaya 561063b560 Fix division by zero without any cols or lines
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-14 00:36:54 +01:00
Christian Duerr b47a88b142
Fix URL highlighting
Fixes #2898.
Fixes #2479.
2019-11-03 21:59:28 +01:00
wayne fa6ceacfa4 Add live config reload for font family and style
Fixes #2737.
2019-11-03 20:02:26 +01:00
Kirill Chibisov b3afb97fcd Fix message bar drawing over terminal after resize
This regression was introduced in
729eef0c93.

Fixes #2924.
2019-10-29 17:58:26 +01:00
Kirill Chibisov 9ff2838844 Fix visual bell rendering mode
Fixes #2911.
2019-10-26 21:45:47 +02: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