Commit Graph

565 Commits

Author SHA1 Message Date
Kirill Chibisov
ed67aa3c08
Add support for horizontal scrolling
This adds support for horizontal mouse scrolling in mouse mode
and alternative scrolling modes.

Fixes #2185.
2023-01-16 20:22:01 +03:00
Christian Duerr
5a3280e8e0
Preserve last column with erase in line right
When the erase in line escape sequence with a parameter of 0 (right) is
passed while the wrapline flag is already set, it will no longer clear
the last column and instead ignore the operation.

The behavior of `\e[1K` and `\e[2K` is unchanged and both will clear the
entire first line without clearing the wrapline flag.

Closes #6159.
2023-01-15 22:53:41 +00:00
Naru
bcd6d0d981
Use sRGB color space for NSWindow on macOS
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2023-01-07 14:23:00 +00:00
Kirill Chibisov
2bd26fbeb0
User timer based rendering instead of vsync
Fixes #824.
2022-12-30 19:25:04 +03:00
Christian Duerr
a49bd74292
Disable depth and stencil buffers
This patch reduces the active GPU memory consumption by disabling the
depth and stencil buffers. During original testing it reduced GPU memory
usage on Linux by almost a third.

This is a reintroduction of previously reverted patch 3475e44.

Closes #2881.
2022-12-29 12:36:50 +03:00
Kirill Chibisov
d5e9d1d883
Apply 'font.glyph_offset.y' for underline/strikeout
Fixes #6561.
2022-12-25 12:42:00 +03:00
Christian Duerr
2291610f72
Fix multi-line bracket selection
This fixes a bug where semantic selection for bracket characters wasn't
working properly over multiple lines since start and end of the
selection were swapped.

Closes #6567.
2022-12-14 20:21:25 +03:00
James McCoy
a152365c14
Add -T short form for --title
Debian-based distributions provide a standard interface to launch a
terminal via the x-terminal-emulator name.  In order for a terminal
emualtor to satisfy that interface, it must

* Be VT100 compatiable
* Support the "-e <command> <args>" CLI option
* Support the "-T <title>" CLI option

Adjust the short form of --title accordingly, providing -t as an alias
to avoid breaking any existing usage.
2022-12-11 00:54:06 +00:00
Kirill Chibisov
79860622a7
Fix crash while typing on Wayland
Fixes #6487.
2022-12-06 04:06:50 +00:00
Christian Duerr
19120f40be
Fix padding update not updating renderer
This fixes an issue where it was possible to update the padding of the
terminal without actually queueing an update for the renderer
projection, leading to a blurry projection.

Closes #6502.
2022-11-28 02:06:19 +00:00
Chris Copeland
7785580602
Fix cursor visibility with focus change on macOS
Fixes #6452.
2022-11-11 10:27:05 +00:00
Kirill Chibisov
0e418bc2f7
Update glutin to 0.30.0
The glutin 0.30.0 update decouples glutin from winit which
provides us with basis for a multithreaded renderer. This
also improves robustness of our configuration picking,
context creation, and surface handling.

As an example we're now able to start on systems without a vsync,
we don't try to build lots of contexts to check if some config works,
and so on.

That also brings us possibility to handle context losses, but that's
a future work.

Fixes #1268.
2022-11-03 19:37:54 +03:00
Kirill Chibisov
578e08486d
Update winit to 0.27.5
Fixes #6396.
2022-10-26 23:04:35 +03:00
Kirill Chibisov
2a2d38fcaa
Bump crossfont and sctk-adwaita
Fixes #6432.
Fixes #6414.
Fixes #6400.
Fixes #6338.
2022-10-26 01:32:02 +03:00
Kirill Chibisov
e3af53c863
Fix startup failure on macOS with dash as /bin/sh
The dash's exec doesn't have `-a` argument we rely on when running
login shell, so use zsh instead.

Fixes #6426.
2022-10-22 13:17:46 +03:00
Kirill Chibisov
62e9d3ab39
Fix crash with very low font sizes
Fixes #6432.
2022-10-21 22:40:42 +03:00
Kirill Chibisov
5b1dd38806
Fix cursor and underlines always being black
Some old hardware doesn't like universal shader approach for all the
rectangle kinds leading to ALU instruction limits. This commit fixes
it by splitting the shader per rectangle kind.

Fixes #6417.
2022-10-21 22:19:42 +03:00
Andrzej Grzeslak
c3b915b695
Fix --help output for --class to match man pages
The output of --help did not match the man pages with regards to the
ordering of arguments for the --class flag. This has now been fixed.

Fixes #6413.
2022-10-18 22:11:40 +00:00
Christian Duerr
269b6e3dba
Fix changelog versioning 2022-10-14 05:57:20 +03:00
Christian Duerr
a51dbe25d6
Bump development version to 0.12.0-dev
This is only an update to the development version and does not represent
a stable release.
2022-09-03 19:43:05 +00:00
Kirill Chibisov
18f9c27939
Add inline input method support
This commit adds support for inline IME handling. It also makes the
search bar use underline cursor instead of using '_' character.

Fixes #1613.
2022-08-29 16:29:13 +03:00
Kirill Chibisov
791f79a02a
Rework --class CLI option
This commit swaps the order of `general` and `instance` arguments
and also sets `instance` to `general` when only one argument was
provided. This should make this option behave like in other terminals
on X11, since they set either both or general by default, but
not instance like Alacritty.

Fixes #6279.
2022-08-25 05:51:19 +00:00
Kirill Chibisov
5549e9eb04
Bump winit to 0.27.2 2022-08-13 10:06:54 +04:00
trimental
376300385b
Use WindowEvent::Occluded to hint rendering
This should prevent rendering on macOS and X11 to invisible
windows.
2022-08-11 13:06:19 +04:00
Kirill Chibisov
7d708d53f7
Bump glutin to 0.29.1
Fixes #6239.
Fixes #5975.
Fixes #5876.
Fixes #5767.
Fixes #4484.
Fixes #3139.
2022-08-10 16:48:46 +04:00
Sabu Siyad
76c5d01ee2
Warn if only columns XOR lines is set
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-08-02 20:43:37 +00:00
Chris Copeland
c3f3bd3666
Register Alacritty shells as tty sessions on macOS
Unless the `shell` config is specified, launch the user's shell with:

```sh
login -flp $USER /bin/sh -c "exec -a -shell /path/to/shell"
```

On macOS, just running a shell prefixed by `-` is not sufficient to be
registered as a login session for things like `w` and `logname`.
However, using the `login` command changes the directory to `$HOME`
before running the program by default, which is not desired. The `-l`
flag disables this behavior, but also skips prepending `-` to the
executed program, so shells will not run as login shells. Instead we
just do this part ourselves with `exec -a`. The result is login shells
that run in the intended directory and are registered as tty sessions.

Fixes #3420.
2022-07-24 02:51:16 +00:00
Chris Copeland
2a676dfad8
Fix thin strokes on macOS
Remove the `font.use_thin_strokes` config, which only did anything on
macOS and only prior to Big Sur. Instead, we will enable or disable
"font smoothing" on macOS based on the `AppleFontSmoothing` user
default.

These changes let users get the "thin strokes" behavior by setting
`AppleFontSmoothing` to 0 with:

```sh
$ defaults write -g AppleFontSmoothing -int 0
```

(Or replace `-g` with `org.alacritty` to apply this setting only to
Alacritty.app, rather than the whole system.)

Add a `removed` config attribute to show helpful warnings to users
who are using config options that don't do anything anymore, and apply
this attribute to `font.use_thin_strokes`.

Bump `crossfont` to 0.5.0 to pick up the new font smoothing behavior.
This release also includes a fix for a crash when trying to load a
disabled font.

Fixes #4616.
Fixes #6108.
2022-07-15 21:56:26 +00:00
Kirill Chibisov
e09ff0b4b0
Use org.alacritty instead of io.alacritty
The common naming is reverse DNS, and given that alacritty is using
alacritty.org it makes more sense to use org.alacritty instead of
old io.alacritty.
2022-07-10 23:55:57 +03:00
Kirill Chibisov
694a52bcff
Add support for hyperlink escape sequence
This commit adds support for hyperlink escape sequence
`OSC 8 ; params ; URI ST`. The configuration option responsible for
those is `hints.enabled.hyperlinks`.

Fixes #922.
2022-07-10 20:11:28 +03:00
Ethan Conneely
8451b75689
Fix error when opening in root dir on Windows 2022-07-10 12:10:28 +03:00
Kirill Chibisov
ebc6922eaa
Add cursor.blink_timeout config option
This option should prevent extensive power usage due to cursor blinking
when there's no user activity being performed.

Fixes #5992.
2022-07-01 11:40:27 +03:00
Sabu Siyad
75b0005619
Add hexadecimal support to --embed
Closes #6145.
2022-06-28 18:22:38 +00:00
Kirill Chibisov
ff63344b7e
Ignore special files for live config reload
When using `--config-file /dev/null` with `live_config_reload`, each
write to `/dev/null` was forcing alacritty to reload its configuration.

This commit makes alacritty ignore special files for live config reload.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-06-16 22:33:47 +00:00
Christian Duerr
4c171e7678
Bump copypasta to 0.8.0
This also applies all non-breaking semver updates.
2022-06-16 18:36:27 +03:00
jeremycostanzo
fdcf99b0c1
Add vi action to center view around vi cursor 2022-06-10 00:08:18 +03:00
Kirill Chibisov
90552e3e7f
Fix flickering during resize on Wayland
This also fixes an issue of windows not being rendered while resizing.

Fixes #6069.
2022-06-09 16:31:08 +00:00
André Kugland
e20541a83e
Fix DEC Special Character Set (Line drawing)
This patch resolves some mapping issues with the line drawing character
set where characters like linefeed were incorrectly mapped to their
proper character representation rather than the codepoint of their
identification glpyh.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-06-01 03:33:08 +00:00
Kirill Chibisov
3bfc4c2808
Don't inherit --command for SpawnNewInstance
Fixes #6060.
2022-05-23 03:35:09 +03:00
algon
e319ca93a6
Fix builtin glyphs for U+2567 and U+2568 2022-05-20 13:08:25 +03:00
Kirill Chibisov
5c51d528ea
Fix gap in builtin box drawing
Builtin box drawing glyphs in range from '\u{2580}' to `\u{2587}`
could have gap due to missing rounding. Previously height was rounded,
however not the `y` offset. This commit fixes it.
2022-05-08 11:24:51 +03:00
mahkoh
9bbb296d1d
Fix selection copy without button release
To prevent the current selection clipboard from being overwritten right
before pasting, text is no longer copied solely because the user
scrolled the scrollback buffer.

The selection also isn't copied when a mouse button other than LMB/RMB
are released, since these are the only ones capable of modifying the
selection range.

This should prevent issues where the selection of the user gets
unexpectedly overwritten, especially in scenarios where the user is
currently in the process of pasting something into Alacritty.

Signed-off-by: Julian Orth <ju.orth@gmail.com>
2022-04-16 18:39:26 +00:00
Kirill Chibisov
851dbc328e
Disallow OSC 52 for unfocused window
This leads to issues on macOS, since if we store clipboard at the same
time it could error out. Also, on e.g. Wayland the clipboard store for
unfocused window won't work anyway.
2022-04-03 23:08:44 +03:00
Kirill Chibisov
b16fe1259c
Reset blinking on search bindings in Vi mode
The Vi cursor is used as the current match indicator, however when
it's blinking during search jumps the current match is invisible.

Fixes #5934.
2022-03-25 15:02:44 +03:00
Kirill Chibisov
e7bb6c2ea7
Persist OpenGL context creation flags
This commit persists OpenGL context creation flags from previous window
build attempts saving time in multiwindow context.

It also creates window as srgb by default, since it's what Alacritty is
rendering in. For reference [1] and [2]. Moreover the fallback for 10
bit colors is also added.

[1] - https://github.com/alacritty/alacritty/issues/4939 and
[2] - https://github.com/alacritty/alacritty/issues/3756.

Fixes #4703.
2022-03-24 12:13:30 +03:00
Kirill Chibisov
f4bdf5fb36
Add colored underline support
This commit adds support for colored underline and refines the dynamic
extra storage. The extra storage now is using `Arc` making cloning it way
faster compared to `Box` approach which scales really well when it comes
to cloning in `Term::write_at_cursor`, since cloning `Arc` is constant
time.

Fixes #4142.
2022-03-16 19:27:55 +03:00
Kirill Chibisov
7312f33f67
Fix font.glyph_offset not live reloading
Fixes #5944.
2022-03-11 12:34:15 +03:00
Christian Duerr
0965773657
Fix crash when searching during reset
This fixes a crash which occurs when the terminal is reset while
searching, due to the vi mode cursor being outside of the visible area.

This also fixes an issue where the search state reset would incorrectly
clamp the vi mode cursor to the grid, rather than the absolute viewport
position.

While this fix does resolve all crashes when searching while running
`cat /dev/urandom`, it does raise the question if manually clamping the
vi mode cursor in every location where it is modified is the right
choice.

A follow-up to provide a safer API which guarantees correct modification
of the vi mode cursor location is probably a good idea.

Fixes #5942.
2022-03-10 22:45:20 +03:00
Kirill Chibisov
1880522b64
Add fallback GLES2 renderer
Currently Alacritty only works on hardware which supports OpenGL 3.3 or
more, which can become problematic with older devices. This patch adds a
new GLES2 renderer, since it is much more widely supported, especially
on weaker hardware like phones or a Raspberry Pi.

While the GLES2 renderer is slower than the OpenGL 3.3+ version, it is
still significantly faster than software rendering. However because of
this performance difference it is only used when necessary and there
should be no difference for machines supporting OpenGL 3.3+.

The two renderers are largely independent and separated in the
`renderer/text/glsl3` and `renderer/text/gles2` modules. Separate
shaders are also required for text rendering. The rectangle rendering
for underlines and the visual bell works identically for both versions,
but does have some version-specific shader code.

Fixes #128.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-03-02 10:05:12 +00:00
Chris Copeland
00383ae967
Add ToggleMaximized key binding action 2022-02-27 18:35:23 +00:00