Age | Commit message (Collapse) | Author |
|
The latest selection changes broke a few tests, these have been
corrected.
Two of these tests were broken because they assumed different span
types, the test have been changed here because the result was correct.
One test did actually catch a bug where selection of two cells from
right to left would incorrectly mark the cells as selected even though
they should not have been, this has been fixed in the `simple_span`
method.
|
|
This changes two things, the first thing it does is that now whenever a
keybinding sends an escape sequence, the viewport is automatically
scrolled to the bottom.
This is enabled by default and fixes #1187.
The second thing is automatic scrolling when a command writes to the
terminal. So when running a command like `sleep 3; ls -lah`, alacritty
will scroll to the bottom once the output is sent, even if the viewport
is currently not at the bottom of the scrollback.
Because this can have an impact on performance, and is not enabled by
default in terminals like iTerm or Termite (VTE), it is an opt-in
setting in the config.
|
|
The different scrolling methods added a bunch of boilerplate where the
call was just forwarded to the next struct, this has been removed by
making the scroll amount into a struct.
Now everything is called through one method and the parameter decides
how far the viewport should be scrolled.
|
|
This offers a few additional hotkeys that can be used in combination
with scrollback. None of these are used by default yet.
This implements the following bindings:
- ScrollPageUp: Scroll exactly one screen height up
- ScrollPageDown: Scroll exactly one screen height down
- ScrollToTop: Scroll as far up as possible
- ScrollToBottom: Scroll as far down as possible
This fixes #1151.
|
|
When the user selected multiple lines, dragging the selection downwards,
and then leaves the cursor to the left side of the first cell, the first
cell was still incorrectly selected. This has been fixed.
The selection also did not update if the mouse was outside of the
window, now all movement events are accpeted even when the mouse is
outside of the window. This allows updating the selection when the user
is dragging the cursor too far.
Mouse movement and click events outside of the window are not
propagated, these are only used for updating the selection.
|
|
There were a few issues with selection in scrollback that were mainly
off-by-one errors. This aims at fixing these issues.
This also fixes a bug that currently exists in master where the last
cell is not selected when the mouse leaves the window to the right.
|
|
|
|
Because there was some overlap with branch #1095, these two PRs have
been added together and the config has been restructured to make use of
a `scrolling` section.
The default faux scrolling amount has also been changed to `3` because
this simplifies the code and falls in line with what most other terminal
emulators do.
There should be no additional test failures due to this.
|
|
It is now possible to configure the amount of lines the viewport should
scroll when using the normal scrolling mode.
This fixes #1160.
|
|
To make it possible to access the native scrollback buffer in the
alternate screen without having to disable faux scrolling, faux
scrolling is now disabled when the `shift` key is held down.
This should allow alacritty to have the best of both worlds, a native
scrollback buffer in the alternate screen buffer and faux scrolling.
|
|
|
|
Scroll wheel needs some scaling so it feels like urxvt and friends.
|
|
|
|
Things that do not work
- Limiting how far back in the buffer it's possible to scroll
- Selections (need to transform to buffer offsets)
|
|
When pasting in non-bracketed more, all line endings (including
DOS-style CRLFs) get normalized to a single CR to simulate a keypress of
the <return> key.
|
|
When pasting in non-bracketed mode, LFs are replaced with CRs.
|
|
There were two bugs fixed in this commit:
1. `sgr_mouse_report` was not always called when `SGR_MOUSE` bit was set
due to calling `normal_mouse_report` instead of `mouse_report` in the
scrolling method.
2. SGR reporting was always going off the left mouse button state rather
than what was appropriate. This affected SGR scroll reporting since
it only behaves correctly for pressed events (final character 'M').
Resolves #698.
|
|
This commit adds clippy as a required step of the build process. To make
this possible, all existing clippy issues have been resolved.
|
|
|
|
ModifiersState is now passed to the mouse methods in `input.rs` as a
whole instead of just passing the `shift` state. This should make it a
bit easier to do changes in the future.
|
|
It seems like the common consensus is that even in mouse mode, the
selection should be cleared with a normal click.
If there is any reason why this should not be the case, please let me
know.
|
|
The tests were using a manually setup `ModifiersState`, to clean things
up a bit the `ModifiersState::default` method has been used to replace
this.
|
|
Three was still a test which passed the whole modifiers struct instead
of just the shift bool, this has been fixed.
|
|
The only mouse modifier required right now is the shift key, to prevent
passing around unnecessary state, only the shift state is passed to the
mouse processors now.
|
|
When an application takes control over the mouse, it usually disables
selection completely. However the common way to still make selection
possible is by allowing selection while the shift key is held down.
This feature is implemented here by making use of the new `modifiers`
field on mouse events with glutin/winit.
This fixes jwilm/alacritty#146.
|
|
The config documentation has been changed to make it clear which part of
the documentation is related to which setting.
The faux scrollback part of the `scroll_terminal` method has been
cleaned up by making use of the fact that the `codepoint + 1` can be
used in the escape sequence which is used for scrolling.
|
|
It is now possible to configure the amount of lines
scrolled with faux scrollback.
|
|
Some people have complained about the behavior of faux scrollback inside
of vim/tmux, however from what I can tell, alacritty behaves the same
way as other terminal emulators that support faux scrollback.
However there are a lot of terminal emulators that do not support faux
scrollback at all, which leads to people complaining about unusual
scroll behavior.
This is my proposal on how to solve this issue, by giving people that do
not like the VTE-Style faux scrolling the option to opt-out.
|
|
Resolves #973
|
|
|
|
|
|
The pixel-based scrolling behavior has been adapted to be as similar to
the line-based one as possible.
I still have not been able to test this. But this should have a decent
chance to at least kinda work.
|
|
Touchpads which use line-based instead of pixel-based updates send
partial scroll requests, so decimal numbers are important. The current
implementation only really used scroll amounts that are either 1 or -1.
This has been fixed and now the line-based touchpads should have very
smooth scrolling, but the pixel-based approach is still WIP and
completely untested.
|
|
This patch implements faux scrolling inside the alternate screen buffer.
Whenever the user scrolls up or down while the alternate screen buffer
is active, instead of actual scrolling three up/down arrow keys are
inserted.
|
|
|
|
Adds support for font resizing at run-time. Three new actions are
introduced:
* IncreaseFontSize - Increases current font size by 1.0
* DecreaseFontSize - Decreases current font size by 1.0
* ResetFontSize - Resets font size to that specified in the
configuration.
The stock config files have example configuration for each which should
match gnome-terminal. For convenience, the config entries are:
- { key: Key0, mods: Control, action: ResetFontSize }
- { key: Equals, mods: Control, action: IncreaseFontSize }
- { key: Subtract, mods: Control, action: DecreaseFontSize }
|
|
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.
|
|
|
|
* Update to latest Glutin/winit
This *finally* gets us off the fork of Glutin we've been on for so long
and will unblock a number of other items. Functionality should be the
same as before.
The update forced our hand on a compiler update. It's no longer
feasible to pin on an old version. From now on, we require latest
stable.
|
|
|
|
Unlike the regular selection that is by cell, these selection modes
highlight either semantic groupings or entire lines while the mouse is
dragged.
|
|
|
|
Implements sending FocusIn/FocusOut events, as defined at
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-FocusIn_FocusOut
|
|
Based on option `command` in key binding section in config, e.g.
- { key: N, mods: Control|Shift, command: alacritty }
# or
- {
key: N,
mods: Control|Shift,
command: {
program: "alacritty",
args: ["-e", "vttest"],
}}
specified command will be run in the background on key press. Alacritty
doesn't wait for its result nor block IO.
|
|
Padding can be configured by using the `padding` field in the config
file, like so:
padding:
x: 2
y: 2
which would result in a 2px padding within each side of the window.
|
|
Fix tests and add line select
Refactor BidirectionalIter to remove if blocks
Allow for cells tagged with WRAPLINE to continue expanding the selection
Reorganize config into structs
Add test coverage that callbacks are called
Cleanup mouse config
- Uses Duration type for ClickHandler::threshold
- Removes `action` property from ClickHandler--this can be added in a
backwards compatible way later on
- Renames ClickState::DblClick to DoubleClick
fixup! Cleanup mouse config
|
|
Fixes #48
|
|
Adds a new "Quit" action and binds it to Cmd-W and Cmd-Q on Mac OS in an
attempt to make Alacritty feel more like a "normal" citizen of the
operating system. Alternatives like Ctrl-D are okay, but I usually want
to leave my shells nested within Tmux open even if I exit my terminal.
It's also largely selfish: I've built up muscle memory over the years
that takes my fingers to Cmd-Q first (and I suspect I'm not the only
one).
The implementation for an exit is copied from `event.rs` which notably
is already tagged with a FIXME. It seems that `tty.rs` contains a
`process_should_exit` system to help handle a `SIGCHLD`, and it's
possible that these two exit implementations should be merged together.
I could probably tackle that as my next project.
As mentioned in #218, Alacritty can't really spawn other windows right
now, so I've tied in Cmd-W as simply another synonym for quitting until
that's implemented.
Fixes #218.
|
|
Should make input processing much more easily tested.
|
|
Paste & PasteSelection are not quite the same. The former should be
pulling from the main clipboard where the latter does not.
|