Commit Graph
786 Commits
Author SHA1 Message Date
Joe Wilm 45c2b3fbf7 checkpoint: very basic scrolling works
Things that do not work

- Limiting how far back in the buffer it's possible to scroll
- Selections (need to transform to buffer offsets)
2018-06-02 09:32:29 -07:00
Joe Wilm 94796a70fc wip scrollback 2018-06-02 09:24:38 -07:00
Joe Wilm 84769ce170 Remove some unused impls 2018-06-02 09:24:38 -07:00
Joe Wilm 92b11cfa43 Minor improvements 2018-06-02 09:24:38 -07:00
Joe Wilm f13685918f WIP optimize scroll in region
This intends to optimize the case where the top of the scrolling region
is the top of the screen. In theory, scrolling in this case can be
optimized to shifting the start/end of the visible region, and then
rearranging any lines that were not supposed to be scrolled (at the
bottom of the region). However, this didn't produce quite the speedup I
expected.
2018-06-02 09:24:38 -07:00
Joe Wilm 350bb8c800 Use memcpy for resetting row contents
In addition to a marginal performance improvement, this simplifies some
logic in the Term implementation since now the Grid fully handles row
recycling.
2018-06-02 09:24:38 -07:00
Joe Wilm a88961bbf0 Remove redundant selection::Region type
The type selection::Region was defined identially to std::ops::Range.
Using something other than range just served to confuse.
2018-06-02 09:24:38 -07:00
Joe Wilm 4ed25009c4 Remove some unused methods and impls 2018-06-02 09:24:38 -07:00
Joe Wilm 6fc0e1ec49 Eliminate ClearRegion trait 2018-06-02 09:24:38 -07:00
Joe Wilm 277425956f Move grid Row and tests into submodules
This is part of some cleanup for the grid module as a whole.
2018-06-02 09:24:38 -07:00
Joe Wilm bbe276e3a8 Back Grid with VecDeque
VecDeque offers improved performance beyond a plain Vec for common
scrolling situations (full screen scroll). Additionally, VecDeque is
necessary for performant scrollback since recycling old rows for a Vec
would be expensive (push/pop front would shift entire vec).
2018-06-02 09:24:38 -07:00
Joe Wilm fd7c1bf663 Cleanup style 2018-06-02 09:24:38 -07:00
Tatsuyuki Ishi 2fcdd40a81 Reduce debug level for release
Backtraces are useful, but line-level debuginfo bloats the binary, and has impact on compile times notably. This reduces it to function-level debuginfo which is a good compromise point.
2018-05-30 10:23:03 -07:00
Francesca Frangipane 765949f256 Update to glutin 0.16.0
Note that `WM_CLASS` is now set to `"alacritty", "Alacritty"`
instead of the previous value of `"Alacritty", "Alacritty"`. This
seems to be more standard.

This also contains some revised recommendations for installing the
`.desktop` file.
2018-05-29 09:50:49 -07:00
Randy Ramos f7172fd6e7 Fix typo in error message 2018-05-25 20:51:55 +00:00
Bradford Boyle 4d4e62db92 Fix locale_id for older versions of OS X (<= 10.11)
This fixes a regression introduced in https://github.com/jwilm/alacritty/pull/1087/files#diff-5ffadea12561d6964b05ac2a0b8e388fL33.
2018-05-25 13:57:47 +00:00
Joe Moon 24e8a19e7d handle older macOS versions
add logic to fallback to `localeIdentifier` if
`currentLocale.languageCode` and `currentLocale.countryCode` are not
available.
2018-05-14 12:37:13 -07:00
Joe Moon 75529be729 macos: add check for valid locale 2018-05-14 12:37:13 -07:00
Joe Moon f818109856 remove commented out line 2018-05-14 12:37:13 -07:00
Joe Moon 1c08fae156 Set $LANG env var using languageCode, countryCode
fixes #933

Using logic from https://github.com/gnachman/iTerm2/blob/79aff4d59fd591e7628649bcabe5f27541740bf6/sources/PTYSession.m#L1703
2018-05-14 12:37:13 -07:00
Christian Duerr e34dccdabf Fix clippy lints 2018-05-11 16:54:19 -07:00
Christian Duerr 5728136350 Paste path into terminal when drag & dropping file
It's now possible to insert the path of a file or directory by dropping
it from the file manager into alacritty.

This fixes #1301.
2018-05-11 16:54:19 -07:00
Christian Duerr 5be0e3ad8f Don't paste selection when in mouse mode
When the mouse mode is set using either 1000h, 1002h or 1003h, the
selection should not be pasted when hitting the middle mouse button,
because it is job of the application to handle this when mouse mode is
enabled.

This has been solved by checking for the current mouse modes whenever
the `PasteSelection` binding is invoked.

This fixes #1215.
2018-05-05 08:10:57 -07:00
zhouji e2abd8945a Fix completion install instructions for Fish on macOS (#1237) 2018-05-01 10:58:52 -07:00
Joe Moon abe678c686 macOS: fixes segfault on nightly
fixes #1264
2018-04-27 17:36:39 -07:00
Matt T. Proud 1b7ffea136 alacritty: add support for OpenBSD.
This commit expands the conditional compilation directives to support
building Alacritty for OpenBSD.  The build succeeds, and Alacritty runs
without issue once https://github.com/rust-lang/libc/pull/957 has been
merged and added to a versioned libc release.

This has been tested on the recently-released OpenBSD 6.3 on amd64 with
rustc 1.24.0 from its standard ports tree.
2018-04-14 10:17:50 -07:00
Bernardo Meurer 3d75c49191 Oxford comma
Added an Oxford comma to the OS support list
2018-03-29 19:47:39 -07:00
Bernardo Meurer b0be5b6bc0 Fixed typos, alphabetical ordering
freeBSD->FreeBSD.
Ordered OS support alphabetically.
2018-03-29 19:47:39 -07:00
MatthiasSchuster fff0e11faa add freeBSD on the top 2018-03-27 09:58:18 -07:00
Saugat Acharya dcc4b75038 Fix typo 2018-03-23 10:20:35 -07:00
Harlan Lieberman-Berg 0edac74e61 Explicitly call log::set_max_level (Closes: #1201)
For some reason, log 0.4 requires that we explicitly set the log level
with log::set_max_level or it defaults to Off.  The documentation
isn't clear but suggests we must do this in addition to doing the
filtration ourselves in the Log impl.
2018-03-22 18:10:27 -07:00
YOSHIOKA Takuma 6debc4f335 Try to create window with different SRGB config when failed
This may truly solve #921 (and issue caused by #1178)
<https://github.com/jwilm/alacritty/issues/921#issuecomment-372619121>.
2018-03-13 16:43:15 -07:00
Christian Duerr 196e602387 Switch meta key to alt instead of super 2018-03-12 23:21:19 -07:00
Christian Duerr f936f40ad2 Add modifiers to mouse events
This commits adds modifiers to the mouse events.

It's an attempt at merging https://github.com/jwilm/alacritty/pull/1141
into this branch/PR.
2018-03-12 23:21:19 -07:00
Celti Burroughs b7e0005334 Fix clippy lints 2018-03-12 23:21:19 -07:00
Celti Burroughs 72296b89d5 Rename button_state to prev_state for clarity 2018-03-12 23:21:19 -07:00
Celti Burroughs fb43c73a38 Extend SGR and VT200 (normal) mouse support
With this commit, Alacritty now reports presses and releases of all
three mouse buttons properly, dragging events with all three buttons,
and mouse movement events where no button is pressed.

It does not report more than three buttons due to inherent limitations
of the VT200 and SGR protocol modes. It does not report modifier keys on
mouse buttons due to practical considerations.

Fixes #714, #506.
2018-03-12 23:21:19 -07:00
らりお (YOSHIOKA Takuma) 5dad4919a2 Enable SRGB (#1178)
This will solve the error "Error creating GL context; Couldn't find any
pixel format that matches the criterias."

(I think this maybe a problem of mesa (18.0.0_rc4), but I'm not sure.

See the thread <https://mastodon.cardina1.red/@lo48576/99670278063669603>
for my debug log.
2018-03-12 23:11:56 -07:00
Christian Duerr b9ad0cfad3 Prevent negative cell dimensions (#1181)
Prevent the cell dimensions from going below 1, this bug resulted in
allocation of large amounts of memory in the scrollback PR but is also
present on master.

Currently the approach is to just `panic!`, however an `eprintln!` and
`exit` could be an alternative too. I don't think it's realistic to
check this at startup and it should have no performance impact since the
failing method is only called once at startup.

To make it a bit more clear what kind of values are accepted, the
datatypes of offsets and paddings have also been changed so that these
don't accept floats anymore and padding can never be negative.

This should allow us to be a bit more strict with the config to make
sure that errors are printed when invalid values are specified (like
negative padding).

This fixes #1167.
2018-03-12 23:07:40 -07:00
Jesse Cooke 1977215b0b Add completion install instructions for Fish 2018-03-12 23:06:04 -07:00
Jesse Cooke d993a45e82 Added -d & -e to fish completions 2018-03-12 23:06:04 -07:00
Jesse Cooke 753d1b00b4 Add fish shell completions 2018-03-12 23:06:04 -07:00
ashwinath cb05e72be2 Add centos missing dependency 2018-03-09 18:04:31 -08:00
Michael Schumacher 8cab01740d Add caret key 2018-03-09 09:54:45 -08:00
Christian Duerr 546e5d1b43 Fix benchmarks 2018-03-09 09:51:27 -08:00
Christian Duerr f298ebb217 Add shell completions and manpage
* Add manpage

Adds a basic manpage that was autogenerated with `help2man` and then
slightly adjusted with information from the README.md and better
formatting.

* Add zsh completions

Add completions for the zsh shell. These should be complete and even
allow completion of the command inside `--command` and `-e`.

* Add bash completions

The bash completions are almost on the same level as the zsh
completions. The only little thing the bash completions do not do is
complete inside of `--command` and `-e`, instead bash just stops
completion after these options.

* Update readme with manpage and completions

Added the install instructions for the manpage and completions to the
README.md.

Also tweaked the current readme a slight bit because the build section
was structured in a slightly confusing way.
2018-03-07 21:34:05 +00:00
Christian Duerr 7f2b398ad2 Remove all instances of unwrap() from config
Unwrapping inside the config file parsing can lead to some issues that
prevent us from falling back to a default configuration file.

One instance of that issue was mentioned in #1135.

Now all instances of `unwrap()` have been removed and replaced with
proper error handling. This will make the config more robust and
prevents live reload from silently breaking while alacritty is running.

This also fixes a few currently existing clippy issues.
Clippy added an additonal lint which complains about `MyStruct { field:
field }`.

These issues have been fixed, except for some false-positives and issues
in external macros which will probably be fixed with future updates (rust-lang-nursery/bitflags#149)
2018-03-04 22:40:15 +00:00
Andy Lok 475ebecfc4 Update arraydeque dependency 2018-02-28 20:33:29 +00:00
Sam Rijs 8045737d58 Upgrade dependencies
Upgrading glutin to the latest version allows building alacritty even
with old XRandr versions.

This is relevant for Debian machines (and other ancient systems).
2018-02-28 19:52:42 +00:00
MindTooth 0afc86cba0 Fix heading for NixOS/Nixpkgs
The level of heading were one to high.
2018-02-27 18:57:19 -08:00