Commit Graph

188 Commits

Author SHA1 Message Date
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
Kirill Chibisov de3437bcd6
Fix class and cursor thickness deserialization
Fixes #3820.
2020-06-05 22:31:57 +00:00
Kirill Chibisov f99220f015
Refactor Shell, Command, and Launcher to share impl 2020-06-05 01:10:31 +03:00
David Hewitt c102e845cd
Add cargo feature for WinPTY 2020-06-02 21:31:06 +00: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 a669f12793
Set IUTF8 input setting on supported platforms
Fixes #3769.
2020-05-27 18:24:01 +03:00
Matthias Krüger 88d87cfa86
Remove unused dependencies 2020-05-24 00:52:47 +00:00
Kirill Chibisov 0f82817c03
Update copypasta to v0.7.0
Fixes #3592.
2020-05-21 01:22:39 +03:00
Christian Duerr 395fee2b01
Fix crash when writing wide char in last column
This resolves an issue where trying to write a fullwidth character in
the last column would crash Alacritty, if linewrapping was disabled.

Instead of assuming that the linewrap put after the linewrapping spacer
was successful, the character writing is now skipped completely when
trying to put a wide character in the last column.
2020-05-17 15:32:06 +00:00
Alexey Chernyshov 9a0eac0a14
Change default color scheme to 'Tomorrow Night'
Fixes #3404.
2020-05-16 22:27:31 +00:00
Christian Duerr b656fba35e
Fix OSCs terminated by \x9c byte in unicode
Fixes #3591.
2020-05-13 12:58:34 +03:00
Christian Duerr 81ce93574f
Extend style guideline documentation 2020-05-05 22:50:23 +00:00
Matthias Krüger 6b45780f3a
Fix clippy warnings 2020-05-01 19:28:43 +00:00
Casper Rogild Storm 7901b454ee
Fix startup locale on macOS
Fixes #2800.
Fixes #2566.
2020-04-30 18:04:02 +00:00
Rémi Garde 34daa1237b
Clear selection on grid swap
Fixes #3290.
2020-04-20 23:38:25 +00:00
Bastien Orivel 03bce99ab6
Update depedencies 2020-04-18 14:34:34 +00:00
Kirill Chibisov 33abfe34a8
Add config option to set cursor thickness
Fixes #3526.
2020-04-15 03:50:34 +00:00
Kirill Chibisov 2fc5120327
Use config colors to theme Wayland decorations
Fixes #2092.
2020-04-09 04:02:10 +03:00
Kirill Chibisov f80e8eca73
Fix tabstops not being reset with 'reset' 2020-03-30 11:46:20 +03:00
Christian Duerr fde2424b39
Remove `fs::read_to_string` reimplementations
After two previous PRs already removed some instances of
reimplementations of the `fs::read_to_string` functionality, this
removes the last remaining occurence and with it all instances of
`File::open`. So this should remove them all for good.
2020-03-26 14:56:41 +00:00
Matthias Krüger 69ca895176
Remove std::fs::read_to_string reimplementation from tests 2020-03-25 15:08:30 +03:00
Christian Duerr c35dbc9657
Fix cursor position after alt screen resize
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-24 01:29:07 +00:00
Christian Duerr ba05e505d5
Fix invisible selection
This resolves a bug where the very first/last cell would still be
selected when both the start and the end were below/above the viewport.
2020-03-21 03:47:52 +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 6801c4a4fd
Bump version to 0.5.0-dev
This is a bump of the development version and does not represent a
stable release.
2020-03-14 16:39:02 +00:00
Christian Duerr ead8d68c69
Fix live config reload for window title
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-14 15:09:10 +00:00
Kirill Chibisov 4000ec04d8
Add option to pick Linux/BSD backends
This commit adds two cargo features `x11` and `wayland` to pick
Linux/BSD backends, with both enabled by default.

Fixes #3340.
2020-03-13 03:33:12 +03:00
Christian Duerr c2e39085e3
Fix crash when selecting last column
This resolves a bug where the selection start would be set to the number
of columns, causing an out of bounds when trying to index with it.
Instead of extending the selection beyond the grid when the right side
of the last column is the start of the selection, the selection will now
start in the beginning of the next line.

Fixes #3446.
2020-03-12 03:14:00 +03:00
Christian Duerr 64a3115648
Fix selection with invisible start and end
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-07 22:17:38 +00:00
Christian Duerr 33cabfc3d2
Remove `ref_test` option from configuration file
This removes the `debug.ref_test` option from the configuration file,
after this change was originally requested from kchibisov in
https://github.com/alacritty/alacritty/pull/3396.

While this option is valueable for the CLI, it provides no value in the
configuration file.
2020-03-04 11:32:07 +00:00
Rémi Garde f7561850b4
Remove HollowBlock/Hidden config cursor styles
Fixes #3367.
2020-03-02 20:41:26 +00:00
Christian Duerr 8c64224582
Remove `tabspaces` config option
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-01 07:07:36 +03:00
Christian Duerr bea6ece3f6
Fix tabs across linewrap
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-03-01 06:27:23 +03:00
Kirill Chibisov 2ac017fa64
Update terminfo dependency 2020-02-29 21:10:51 +03:00
Kirill Chibisov 2365425fd2
Fix log target of color config errors
Due to incorrect log target in the color config errors, the message bar was not
cleared when the error was fixed.
2020-02-28 02:28:15 +00:00
Christian Duerr 17b8bbb908
Remove docs for 0xRRGGBB color notation 2020-02-27 23:06:04 +00:00
Christian Duerr fa11b56cf6
Fix config reload updating incorrect grid 2020-02-23 01:55:29 +00:00
Christian Duerr 71dd1bc386
Fix block selection including last column
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-22 02:42:44 +00:00
Christian Duerr eb1a28ce58
Extract winpty crate
The winpty crate and its winpty-sys depedency have been moved to
https://github.com/alacritty/winpty.
2020-02-17 16:24:27 +00:00
Christian Duerr ff09e39309
Fix parser stopping at unknown modes
This resolves an issue in the parser where it would stop as soon as the
first unknown value is encountered in private mode/sgr attribute
escapes.

Fixes #3339.
2020-02-15 20:00:53 +00:00
Kirill Chibisov 7ecf93ec70
Fix incorrect display offset after rotation
Regression was introduced in 4cc6421daa,
however it was working before only due to grid.len() bug.
2020-02-12 20:24:24 +00:00
Christian Duerr bfd69d0178
Bump vte and urlocator
Fixes #3247.
2020-02-11 23:50:20 +00:00
Christian Duerr 3b8ef3a0c4
Revert "Fix backspace deleting chars when IME is open"
This reverts commit 7f4dce2ee0.

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-10 23:41:48 +00:00
Christian Duerr 6832b86aa7
Fix selection expansion across full-width glyphs
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-02-07 09:50:18 +03:00
Christian Duerr 2ef5e47b8e
Mirror OSC query terminator
Fixes #3091.
2020-01-31 00:00:23 +00:00
Christian Duerr 871a22eaf4
Fix inconsistent test module naming 2020-01-28 12:32:35 +00:00
Kirill Chibisov 4cc6421daa Fix incorrect grid.len() and grid.history_size() 2020-01-26 14:49:58 +01:00
Christian Duerr bdd28f4766
Fix selection rotating outside of scrolling region
Fixes #2983.
2020-01-24 23:57:22 +01:00
eau 7925ac4918 Fix build error on OpenBSD 2020-01-24 18:16:09 +01:00
Kirill Chibisov 906f14b660 Fix oob error during selection
Fixes #3233.
2020-01-21 22:17:25 +01:00