Commit Graph

1147 Commits

Author SHA1 Message Date
Christian Duerr e98ea64c74
Bump dependencies 2019-04-03 22:57:54 +00:00
Christian Duerr 86ccd0566e
Fix BSD build failure
This updates all dependencies removing any reference to nix 0.12 which
prevents successful builds on OpenBSD.

Fixes #2244.
2019-04-02 23:29:36 +00:00
Christian Duerr 48d781d123
Fix Windows deployment 2019-04-02 22:58:18 +00:00
Christian Duerr 6f4d1afcf8
Add official logo 2019-04-01 22:41:20 +00:00
Christian Duerr 5523f64c6f
Revert daemon removal
This reverts the removal of the call to libc::daemon and instead adds an
annotation to ignore the deprecation warnings on macos.

This will not be an issue in the future since macOS is only discouraging
the use of `daemon`, but I'm not aware of any intention to actually
remove it.

This fixes #2211.
2019-04-01 22:27:27 +00:00
David Hewitt a9c6e2807f Merge "Changed" sections in ChangeLog 2019-03-31 18:29:04 +00:00
Christian Duerr cfd025b528
Add rustfmt style guide 2019-03-30 16:48:36 +00:00
Christian Duerr 91aa683bcd
Rework URL highlighting
This completely reworks URL highlighting to fix two issues which were
caused by the original approach.

The primary issues that were not straight-forward to resolve with the
previous implementation were about handling the URL highlighted content
moving while the highlight is active.

This lead to issues with highlighting with scrolling and when the
display offset was not 0.

The new approach sticks closely to prior art done for the selection,
where the selection is tracked on the grid and updated whenever the
buffer is rotated.

The truncation of URLs was incorrectly assuming input to be just a
single codepoint wide to truncate the end of URLs with unmatching
closing parenthesis. This is now handled properly using Rust's built-in
Unicode support.

This fixes #2231.
This fixes #2225.
2019-03-30 09:23:48 +00:00
Christian Duerr 28636923e0
Update --class docs
Since the `--class` flag has been changed to take effect on Wayland too,
the documentation has been updated to reflect that.

The original change was made in #2077.
2019-03-29 13:21:55 +00:00
Christian Duerr 8654a09f73
Fix prompt jumping during reflow
If the window is resized while lines are longer than the visible area,
Alacritty will no longer move down the prompt and pull from history when
possible but instead keep the prompt in place and move the additional
lines into the scrollback buffer.

This fixes #2213.
2019-03-28 14:35:01 +00:00
Christian Duerr 16153e615d
Disable URL highlight with URL launcher disabled 2019-03-28 07:02:44 +00:00
Christian Duerr 77536e8fac
Revert accidental deletion of change log entry 2019-03-26 17:38:01 +01:00
Elaina Martineau 022f0782e4 Fix `start_maximized` option on X11 2019-03-25 00:27:34 +00:00
Christian Duerr 3e36d714fe
Fix URL highlight crash
The URL highlight stores the state of the last URL highlight with the
position of the URL start position. However when resizing, it's possible
that the indices of this point change which will cause a crash if the
old positions are not within the grid anymore.

This has been resolved by resetting the URL highlight state whenever the
terminal is resized.

The original PR incorrectly required the shift modifier to be required
when the user was in the alternate screen buffer. However the correct
behavior is to require it when the mouse mode is enabled.

This has been resolved and URLs are now highlighted in the alt screen
even if no shift modifier is pressed.

This fixes #2194.
2019-03-24 17:37:30 +00:00
Christian Duerr d8272662db
Fix URL parsing with double-width characters
Since double-width characters are followed by an empty cell containing
only the `WIDE_CELL_SPACER` flag, the URL parser would stop once
encountering the cell after a double-width character.

By skipping cells that contain the `WIDE_CELL_SPACER` flag and
incrementing the URL length by unicode width of the character instead of
cell count, this can be resolved for both URL launching and URL
highlighting.

Fixes #2158.
2019-03-23 11:56:46 +00:00
Alex Touchet d29c309007 Update extended-description for deb file 2019-03-21 22:45:03 +00:00
Christian Duerr 32cb48774a
Remove deprecated libc::daemon call
Since version 10.5 of macOS the libc::daemon call has been deprecated.
While it is recommended by macOS to use launchd instead, this is not
easily available on other unix platforms.

However since we just spawn a daemon process to prevent Alacritty from
spawning zombies, we can manually invoke `fork` in the child process to
cause a double-fork and re-parent the child process under init so it can
be reaped automatically.

Since the daemon call is not part of POSIX, using the double fork on all
unix platforms also has some portability advantages.
2019-03-21 19:55:19 +00:00
Christian Duerr c6ab2a8867
Fix URLs getting incorrectly extended to next line
If a URL ends right at the end of the terminal, it would sometimes
incorrectly include the characters from the following line when
launching the URL.

Similar to the semantic search function, the URL parsing iterator will
now stop if it encounters a cell at the end of the line which does not
contain the `WRAPLINE` flag.

This fixes #1906.
2019-03-19 22:32:40 +00:00
Christian Duerr a672f7d553
Add URL hover highlighting
This changes the cursor whenever it moves to a cell which contains
part of a URL.

When a URL is hovered over, all characters that are recognized as part
of the URL will be underlined and the mouse cursor shape will be
changed. After the cursor leaves the URL, the previous hover state is
restored.

This also changes the behavior when clicking an illegal character right
in front of a URL. Previously this would still launch the URL, but strip
the illegal character. Now these clicks are ignored to make sure there's
no mismatch between underline and legal URL click positions
2019-03-19 19:14:17 +00:00
Christian Duerr eb7a1ea803
Remove InclusiveRange code
This removes all inclusive range code since it has been recently
stabilized in the standard lib.
2019-03-17 21:09:27 +00:00
Christian Duerr fc28e49c27
Add change log entry for Wayland title fix
Fixes #2104.
2019-03-15 20:48:51 +00:00
Aaron Goodfellow e2eb5bbd2e Add additional key bindings for changing font size
This fixes #2010.
2019-03-15 20:41:48 +00:00
Hirokazu Hata 94cf97b42d Update Cargo.lock 2019-03-15 00:11:44 +00:00
Alex Purdy 3a9b8e65dd Fix invalid --working-dir string ptr for ConPTY 2019-03-14 20:27:18 +00:00
Christian Duerr 0f96a62218
Update glutin to version 0.20
Fixes #458.
Fixes #1681.
2019-03-14 20:06:38 +00:00
Christian Duerr b1032bcc6b
Add text reflow
Alacritty will now automatically reflow lines and shrink them when they
would usually exceed the new width of the terminal instead of
truncation.

If a line had to be truncated, it will also be reflown into the previous
line after growing the terminal width.

The reflow behavior when not at the bottom of the history is similar to
that of VTE and aims to keep the viewport stationary whenever possible.

Opposed to VTE, reflow will also be performed in the alternate screen
buffer.

There will be bugs when resizing the terminal emulator to a size smaller
than the prompt, though these issues were present in all terminal
emulators with reflow support.

This fixes #591.
2019-03-13 18:55:18 +00:00
Kirill Chibisov 0b9ae4ce93 Add config option to change selection color 2019-03-12 23:11:32 +00:00
Rachel K 62c1d999e1 Fix signal handling on Unix systems
This removes the the signal handling machinery in tty::unix, and
replaces it with functionality from signal-hook, which should be more
robust. Signals caught by signal-hook wake up the existing I/O event
loop, which then delegates back to the PTY to handle them.

In particular, this allows `SIGCHLD` (i.e. child process exits) to shut
down the terminal promptly, instead of sometimes leaving the window
lingering.

Fixes #915.
Fixes #1276.
Fixes #1313.

As a side effect, this fixes a very rare bug on Linux, where a `read`
from the PTY on the master side would sometimes "fail" with `EIO` if the
child closed the client side at a particular moment. This was subject to
a race condition, and was very difficult to trigger in practice.
2019-03-12 19:44:47 +00:00
Cole Helbling e240da9ab3 Add option for window position at startup 2019-03-11 12:35:49 +00:00
Tobias Kortkamp 0ec4bd28da Add support for SpawnNewInstance using linux compat on FreeBSD
This fixes opening a new instance in the shell's current working
directory.  The code currently assumes that there is a Linux
compatible procfs mounted on /proc which is not the case on FreeBSD.
However linprocfs(5) is often mounted on /compat/linux/proc so we
can use that here for the time being.

A proper solution would look up the kern.proc.cwd.<pid> sysctl
instead, but that is not currently easily doable due to missing
KERN_PROC_CWD and struct kinfo_file definitions in the libc crate.
2019-03-08 16:36:23 +00:00
David Hewitt ea87c1546b Add dynamic title support for Window 2019-03-07 20:37:11 +00:00
David Hewitt 9ba7c4fae4 Make start_daemon behaviour on Windows consistent with Unix
In cases where the Alacritty process had invalid std handles then
the ConPTY subprocess would fail to spawn. By setting appropriate
flags we prevent these handles from being passed to the ConPTY
subprocess.
2019-03-04 22:58:03 +00:00
Christian Duerr ba9aaa0539
Remove appveyor badge from readme 2019-03-04 16:23:19 +00:00
Lado Tonia 104b866cb6 Fix selection starting inside padding
This fixes #2109.
2019-03-04 16:20:15 +00:00
Christian Duerr 1ca729487e
Fix terminfo support for extended capabilities
To make sure all extended capabilities can be queried correctly, it is
necessary to compile the terminfo file using the `-x` flag.

Since Alacritty specified support for the XTerm mouse mode (XM/xm),
using the `-x` flag was not possible until now without breaking programs
like `htop`. By removing this flag, these issues should be resolved.

This fixes https://github.com/jwilm/alacritty/issues/2131.
2019-03-03 20:25:29 +00:00
Christian Duerr de52ddb6c2
Fix alt screen bugs
This fixes two bugs with the alternate screen buffer.

When resetting while in the alt screen, Alacritty would not swap out
the grids leading to scrollback getting disabled. By swapping out the
grids again when resetting in the alternate screen buffer, scrollback is
now unaffected from a reset.

There was another issue with the cursor jumping around when leaving the
alt screen even though it was not active, this was fixed by skipping all
alt screen swap routines unless the current state matches the expected
state.

This fixes #2145.
2019-03-02 21:30:29 +00:00
stfn 9468b50b75 Add additional key bindings 2019-03-02 18:57:07 +00:00
Christian Duerr 3c4bb7c115
Fix scrollback live reloading
This fixes two issues with live reloading the `scrolling.history`
property.

It is now possible to increase the scrollback history without restarting
Alacritty.

When decreasing the scrollback history while scrolled beyond the new
history limit, Alacritty will reset the viewport position to the new
limit instead of crashing.

This fixes #2147.
2019-03-02 18:32:48 +00:00
Erik Berkun-Drevnig e0fdc3329c Add MSI installer for Windows 2019-03-02 18:31:14 +00:00
Starz0r 8d5e1226d5 Add install instructions for Chocolatey to readme 2019-02-25 23:45:17 +00:00
Christian Duerr 3c672cca4b
Fix selection copying with mouse outside of window
There was an issue caused by 35efb4619c
which would lead to the current selection not getting copied to the
clipboard if the mouse was released outside of the window.

Instead of aborting any press/release actions when the cursor is not
inside of Alacritty, the handling is now delayed until actual usage.
2019-02-21 21:13:14 +01:00
David Hewitt 14e3a0ae5a Fix panic on exit with ConPTY
Even though the `ClosePseudoConsole` API does not have a return
value, it was incorrectly queried by the `Drop` implementation for
the ConPTY, leading to a panic on exit.

The definition of this call has been updated to match the actual
function signatures, which resolve this problem.
2019-02-21 09:28:33 +00:00
Nathan Lilienthal 66b3f4c877
Small Updates to the README (#2091)
Update the README and related files.

This commit generally updates some language in the "About" section, and other sections with respect to keeping accurate information, and laying out the project goals in a clear way.

We're also marking Alacritty as "beta" software at this point, not that this has any explicit meaning.
2019-02-18 14:54:46 -05:00
Tanuj 1e815dca57 Add early return to `received_char` 2019-02-16 20:23:23 +00:00
Tanuj 9392b8e837 Fix broken link in CONTRIBUTING.md 2019-02-16 19:22:01 +00:00
Tanuj 18bc979821 Remove incorrect doc comment 2019-02-16 19:20:29 +00:00
Christian Duerr b295ac9b9b
Update fish completion installation 2019-02-13 22:15:30 +00:00
Christian Duerr 3ec53b4f0b
Bump version to 0.2.9 2019-02-11 23:59:21 +00:00
Christian Duerr bfb67ed8f2
Fix font spacing error
Fixes #2098.
2019-02-11 21:33:37 +00:00
Christian Duerr 8681e2e8a0
Remove deployment script from clippy builds 2019-02-10 23:15:00 +00:00