Commit Graph

169 Commits

Author SHA1 Message Date
Christian Duerr
527dc8f564
Fix ncurses backspace key
Ncurses does some special handling for backspace, normally comparing it
to the KEY_BACKSPACE constant. However to make this work, the right
backspace escape sequence needs to be set in the terminfo.

XTerm has this set to ^H, but it always sends ^H. Since Alacritty
usually sends ^? instead, this needs to be specified to allow correct
interpretation for ncurses.
2019-06-07 22:09:22 +00:00
Elaina Martineau
45565bb9ca Re-invert cursor when in selection 2019-06-06 00:02:20 +00:00
rbong
f79007035c Add foreground/background request escape codes 2019-06-02 13:16:38 +00:00
Khairul Azhar Kasmiran
dea7a0890a Skip UTF-8 BOM when reading config file 2019-05-28 16:29:42 +00:00
Jacob Evan Shreve
29c037e3c5 Allow URLs to end with trailing slash 2019-05-19 19:24:00 +00:00
Christian Duerr
d934df6c0e
Fix URL detection matching invalid URLs
Fixes #2450.
2019-05-16 21:05:00 +00:00
Christian Duerr
2a6e9843ea
Reenable macOS automatic graphics switching
This issue has been resolved upstream by a macOS update, fixing all
crashing issues when switching between integrated and dedicated GPUs.

Fixes #2221.
2019-05-14 15:36:13 +00:00
Jean Mertz
1656aff85e Add support for double-click bracket-pair selection 2019-05-11 16:15:32 +00:00
derpmatt
bdae9f0f28 Add linux Appstream packaging data 2019-05-11 14:29:07 +00:00
Christian Duerr
5d173f6df3
Refactor config parsing files
This is a large refactor of the config parsing structure, attempting to
reduce the size of the file a bit by splitting it up into different
modules with more specific purposes.

This also fixes #2279.
2019-05-10 11:36:16 +00:00
ijl
864cd9b8ef Add NSSystemAdministrationUsageDescription to macOS manifest
This resolves permission failures when modifying root-owned files
and such, e.g., modifying /etc/hosts. It had been possible
to work around this by adding alacritty to the set of
applications with "Full Disk Access" in System Preferences. macOS
now opens a prompt to confirm permission with a new installation.

This fixes #2337.
2019-05-07 15:49:22 +00:00
Nathan Lilienthal
34c54e7e0e
Add git hash to version string, and fix crate name (#2397)
This moves `cli` out of `alacritty_terminal` and into `alacritty` where
it belongs, along with the `clap` dependency.
2019-05-03 19:48:25 -04:00
Christian Duerr
bf353059a0
Fix selection of double-width characters
This changes the selection behavior to automatically select both cells
of double width characters in either selection direction.

This fixes #2322.
2019-04-29 14:33:25 +00:00
Christian Duerr
21a97c1ef2
Fix mouse mode generate events without cell change 2019-04-28 22:36:02 +00:00
Christian Duerr
9e89aaa477
Switch from copypasta to rust-clipboard
This switches our own `copypasta` crate with the more standardized
`clipboard` library, which allows us to get rid of the `xclip`
dependency on X11.

Additionally, this lays the foundation for native Wayland clipboard
support once the clipboard crate is updated (or a fork is created).

Fixes #5.
2019-04-28 20:21:39 +00:00
Kirill Chibisov
37b66a7cd2 Set _NET_WM_ICON on X11 2019-04-28 18:12:35 +00:00
Elaina Martineau
b321406908 Fix double-width characters in URLs only highlighting halfway 2019-04-28 16:09:26 +00:00
Christian Duerr
9c6d12ea2c
Fix position of zero-width over double-width characters 2019-04-25 22:26:22 +00:00
Christian Duerr
494348abe8
Fix cursor disappearing
The cfc20d4f34 commit introduced a
regression which would cause the cursor to disappear after the glyph
cache has been filled.

Since the cursor was not cached on the glyph cache, the cursor would
quickly fill up the OpenGL texture with lots of cursor textures and then
things would break after the atlas was filled completely.

This adds a separate cursor cache which is keyed by the cursor style
that will persist the texture without flooding the atlas.

This fixes #2355.
2019-04-25 20:01:23 +00:00
Christian Duerr
e964af8a5e
Show same fg/bg text when inversed
If a cell has a matching foreground and background and is inversed
through the escape or selection, it will now fall back to the default
background on top of the default foreground.

This makes it possible to show invisible text like this by selecting it.

Hidden text is unaffected by this change.

This fixes #2315.
2019-04-25 16:51:45 +00:00
Christian Duerr
73e7a95d54
Fix message bar not updating PTY size 2019-04-24 18:17:09 +00:00
acheronfail
e9813031f6 Add fullscreen support
Fixes #34.
Fixes #2012.
2019-04-23 19:05:47 +00:00
Ben Pye
b0efa9d105 Add DirectWrite font rasterizer
This adds a DirectWrite font rasterizer for Windows and enables
subpixel rendering and hinting.

It also completely replaces rusttype for font rendering on Windows,
allowing Alacritty to use the native font stacks on all operating systems.

Fixes #1673.
Fixes #2316.
2019-04-23 17:41:21 +00:00
Christian Duerr
4fbae5e397
Bump version to 0.3.2 2019-04-22 22:19:55 +00:00
Andrew Opalach
c901c74d01 Fix ConPTY panic 2019-04-22 19:50:07 +00:00
Christian Duerr
2b39e6bf99
Bump version to 0.3.1 2019-04-22 16:04:58 +00:00
Christian Duerr
cfc20d4f34
Fix cursor dimensions with font offset
Previously cursor dimensions were not calculated correctly when a font
offset was specified, since the font offset was completely ignored.

This has been fixed by moving all the cursor logic from the font into
the Alacritty crate, applying the config's offsets before rasterizing
the cursors.

This has also fixed an issue with some cursors not being rendered as
double-width correctly when over double-width glyphs.

This fixes #2209.
2019-04-19 18:00:24 +00:00
Christian Duerr
6716c81c08
Fix update_lines performance issues
This resolves performance issues with the `update_lines` method that
were caused by excessive updates without underlines or strikeout
present.

This also resolves a bug that was causing the underline and strikeout to
extend beyond the end of line in some rare cases.

This fixes #114.
2019-04-19 12:07:56 +00:00
Eike Christian Karbe
ab8fddd593 Call TIOCSWINSZ only on grid change
Instead of calling TIOCSWINSZ for every pixel change it will now be called only on changes to the grid size. This should reduce screen refreshes.

This fixes #2177.
2019-04-17 22:42:27 +00:00
Christian Duerr
5174f9b274
Fix duplicate resize events
If a resize event is identical to the current size, it is no longer
propagated but the resize is discarded immediately.

To further prevent resizes when not necessary, the list of monitors is
enumerated and the DPR of the first display is assumed to be the target
DPR.

This allows spawning a window with dimensions when the config has
columns and lines specified and the window only needs to be resized if
the estimated DPR is not correct.

Fixes #1825.
Fixes #204.
2019-04-14 15:37:58 +00:00
Christian Duerr
aac62ce5ac
Fix macos subprocess execution
This fixes the execution of subprocesses on macOS which could sometimes
prevent actions like `SpawnNewProcess` or custom commands from launching
their processes correctly.

This fixes #2259.
2019-04-11 08:41:20 +00:00
Christian Duerr
56fea343ff
Set maximum Rust version to 1.31.0
By setting the minimum Rust version and enforcing it with CI, Alacritty
should hopefully make it possible for maintainers to package the
application even on distributions which are not rolling release.

The 1.31.0 target has been chosen here because it's the first version of
the Rust 2018 release. Bumping this version in the future should be
considered to be a breaking change and should only be done with caution
and in consideration of the supported Rust versions of the major
distributions available.

This fixes #2277.
2019-04-09 19:29:46 +00:00
Alex Touchet
22eff1b550 Remove duplicate changelog entry 2019-04-08 22:37:21 +00:00
Daniel Eklöf
bc80a74a69 Reset scrolling region when receiving RIS escape 2019-04-08 22:19:22 +00:00
Jerry Yin
090842bd8e Add ScrollLineUp and ScrollLineDown actions for scrolling line by line 2019-04-08 19:50:06 +00:00
Christian Duerr
6757acbb82
Bump version to 0.3.0 2019-04-08 19:14:51 +00:00
Christian Duerr
f0dbfc9b9c
Fix build errors on BSD
This updates winit and glutin to the latest git versions instead of
relying on releases to fix a build failure on BSD.

Unfortunately the upstream version bumps might still take a bit and
there hasn't been any feedback with regards to a planned release date.

This also fixes a slight issue on Windows where selections would start
when focusing a window and a build failure with some Linux systems

Fixes #2243.
Fixes #2170.
Fixes #2244.
2019-04-04 23:11:29 +00:00
Christian Duerr
5776ec09d6
Disable automatic graphics switching on macOS
Temporarily disabled automatic graphics switching due to a bug in macOS
which leads to crashing.

See #2221.
2019-04-04 23:05:49 +00:00
Kirill Chibisov
dbce674d70 Add icon to Linux .desktop file 2019-04-04 18:41:57 +00:00
David Hewitt
a9c6e2807f Merge "Changed" sections in ChangeLog 2019-03-31 18:29:04 +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
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
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
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
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
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