Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
cc #87, #55
|
|
|
|
Resolves #46.
|
|
Resolves #43.
|
|
Resolves #37.
|
|
Previously, these could have crashed alacritty. Now, they simply print
an error message in Red to stderr. The Red format wrapper was moved to a
central location where both main.rs and the alacritty lib can access it.
|
|
According to:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Mouse-Tracking
|
|
There was a lot of complexity around the threadsafe `Flag` type and
waking up the event loop. The idea was to prevent unnecessary calls to
the glutin window's wakeup_event_loop() method which can be expensive.
This complexity made it difficult to get synchronization between the pty
reader and the render thread correct. Now, the `dirty` flag on the
terminal is also used to prevent spurious wakeups. It is only changed
when the mutex is held, so race conditions associated with that flag
shouldn't happen.
|
|
Moving the window on macOS would cause a panic in certain circumstances.
|
|
|
|
Still need automatic loading into selection copy buffer for linux.
|
|
The somewhat redundant KeyBinding and MouseBinding types were removed in
favor of a Binding<T> type. This allows all binding code to be reused
for both scenarios.
The binding tests were fixed by only asserting on `is_triggered_by()`
instead of checking that the action escape sequence was delivered
properly.
|