Age | Commit message (Collapse) | Author |
|
The default cursor can now be configured through the cursor_style field
of the config. Valid options include Block, Underline, and Beam.
The default can be restored by sending \e[0q as in VTE terminals.
Live config reloading is supported for this parameter.
|
|
* Support text cursor color escape codes
* Support reset color index escape code
* Support multiple colors in set color index escape code
|
|
|
|
|
|
Because there are so many clippy warnings in the current codebase,
this commit removes '#![cfg_attr(feature = "clippy", deny(clippy))]',
to make it easier to fix warnings incrementally.
|
|
|
|
|
|
Add support for the VTE 'dim' flag, with additional support for
custom-themed dim colors. If no color is specified in the config, it
will default to 2/3 the previous (not a spec, but the value other
terminals seem to use).
The actual dimming behavior brings bright colors to normal and regular
colors to the new dim ones. Custom RGB values are not changed, nor are
non-named indexed colors.
|
|
Notable about this implementation is it takes a different approach for
managing cursor cells that previously. The terminal Grid is now
borrowed *immutably*. Instead of mutating Cells in the Grid, a list is
managed within the RenderableCellsIter. The cell at the cursor location
is skipped over, and instead cells are popped off a list of cursor
cells.
It would be good in the future to share some more code between the
different cursor style implementations for populating the cursor cells
list.
Supercedes #349.
|
|
Implements sending FocusIn/FocusOut events, as defined at
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-FocusIn_FocusOut
|
|
|
|
|
|
|
|
It's not possible with DECCOLM to temporarily set 80 or 132 column mode
since the function is a toggle between the two. Instead, only the
additional affects are run in order to get closer to passing vttest.
vttest will never be perfect due to the column mode issue.
|
|
|
|
|
|
Xterm supports an extension to the CSI command `Erase in Display (ED)`,
under the command number 3. This command is used to clear the scrollback
buffer - e.g. anything not visible on the screen.
Since scrollback is not part of alacritty, the handler for this
command currently does nothing. If at some point scrollback is implemented,
the corresponding `match` arm can be modified to properly handle this.
For an example of a program which uses this command, run the `clear`
command (using ncurses 6.0). In a supported terminal such as
`gnome-terminal`, this will clear anything off of the screen from the
scrollback buffer. Before this change, `alacritty` would generate
an `Unhandled CSI` message.
|
|
|
|
This changes the cursor color config to use the `text` and `cursor`
properties instead of the current `foreground` and `background`
properties. The latter names stop making sense when dealing with cursors
like a vertical bar or underscore. In the new system, the block,
underscore, or vertical bar would always take the color of `cursor`, and
the text would take the color of `text` when using a block, or keep its
normal color when using the underscore or vertical bar.
A warning is now emitted on startup when the old form of cursor color
config is used. This will be a hard error in the future.
|
|
Resolves #26.
|
|
This passes the vttest for save and restore cursor position. The
implementation was done according to:
http://www.vt100.net/docs/vt510-rm/DECSC.html
As of yet, there are a few things not supported by the terminal which
should otherwise be saved/restored.
vte was updated for a fix with CSI param parsing
|
|
|
|
|
|
Implement the designation of graphic character sets G0-G3 to ASCII or the
Special character and line drawing glyphs. As well as the invokation/selection
of the character sets (shift in, shift out and lock shifting).
|
|
These changes provide support for disabling auto line wrap which is
currently default to on.
'tput rman' will now disable auto line wrap and alacritty will now not
automatically wrap lines.
'tput sman' will now (re)enable auto line wrap and alacritty will now
automatically wrap lines once it reaches the end of the line.
My testing showed this to work the same as gnome-terminal.
I should note that simply having ^[[7h or ^[[7l in a recording does not
enable and disable line wrapping. This is the same behavior as
gnome-terminal and xterm. Those cape codes come through as private
which are not handled yet. I behave this is the correct behavior.
|
|
Resolves #23
Resolves #144
|
|
cc #116
|
|
|
|
|
|
According to:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
|
|
|
|
|
|
All of the changes in this commit are due to clippy lints.
|
|
Adds a wrapper for the glutin::Window which provides strongly typed
APIs and more convenient interfaces. Moves some gl calls into the
opengl-based renderer.
The point of most of the changes here is to clean up main().
|
|
The identify_terminal function signature had to change to support
writing to the terminal before processing additional input.
|
|
There's now a ColorList type that provides strongly typed indexing for
not only usize but NamedColor as well. Previously, the `NamedColor` was
casted to a `usize` when indexing the colors. Additionally, only one
copy of the ColorList needs to exist;it's borrowed from the `Config`
when rendering, and the renderer doesn't need a copy.
|
|
ANSI escape sequences like `\x1b[48;5;10m` were not supported until now.
Specifically, the second attribute, 5, says that the following attribute
is a color index.
The ref tests were updated since `enum Color` variants changed.
|
|
Binding/Action execute now has access to TermMode to support bracketed
paste mode.
|
|
This allows the user for eg clicking columnts in htop to sort.
|
|
Ref tests use a recording of the terminal protocol and a serialization
of the grid state to check that the parsing and action handling systems
produce the correct result. Ref tests may be recorded by running
alacritty with `--ref-test` and closing the terminal by using the window
"X" button. At that point, the recording is fully written to disk, and a
serialization of important state is recorded. Those files should be
moved to an appropriate folder in the `tests/ref/` tree, and the
`ref_test!` macro invocation should be updated accordingly.
A couple of changes were necessary to make this work:
* Ref tests shouldn't create a pty; the pty was refactored out of the
`Term` type.
* Repeatable lines/cols were needed; on startup, the terminal is resized
* by default to 80x24 though that may be changed by passing
`--dimensions w h`.
* Calculating window size based on desired rows/columns and font metrics
required making load_font callable multiple times.
* Refactor types into library crate so they may be imported in an
integration test.
* A whole bunch of types needed symmetric serialization and
deserialization. Mostly this was just adding derives, but the custom
deserialization of Rgb had to change to a deserialize_with function.
This initially adds one ref test as a sanity check, and more will be
added in subsequent commits. This initial ref tests just starts the
terminal and runs `ll`.
|
|
This feature is on by default
|
|
The architecture here is really poor. Need to move file watching into a
dedicated location and probably have an spmc broadcast queue. other
modules besides rendering will care about config reloading in the
future.
|
|
This is used by things like Bash's reverse-i-search and things get
*very* messed up without it.
|
|
Also enables debug symbols in release profile by default. Until
Alacritty ships, there's going to be lots of perf analysis which needs
debug symbols.
The PriorityMutex low priority method was never used. Now it's just a
fair mutex.
|
|
|
|
This was previously logging as an unhandled `execute`.
|
|
Using the vte crate allows removal of the ansi parser state machine and
enables us to just be concerned with actions described in the protocol.
In addition to making alacritty simpler, this also improves correctness
and performance.
|
|
|
|
Errors/warnings fixed.
|
|
It was always printing intead of only debug builds.
|