Commit graph

2357 commits

Author SHA1 Message Date
Christian Duerr 4a7728bf7f
Fix fullwidth semantic escape characters
Semantic escape characters occupying two two grid cells were always
skipped over, making it impossible to have functional fullwidth
characters as part of semantic escape characters.

This patch fixes this by only skipping over fullwidth spacer cells,
rather than skipping those cells entirely.

Closes #8188.
2024-09-22 17:58:16 +03:00
Christian Duerr c74b5fa857
Ignore cursor color request with default colors
Currently when the cursor colors are requested for the default cursor
color, Alacritty always responds with #000000. Since this is most likely
incorrect, this response is misleading.

Realistically there's very little reason why any application would need
to know the color of the (often dynamically changing) default cursor. So
instead of always reporting an incorrect black value, this patch just
stops reporting values unless the cursor color was explicitly changed.

Closes #8169.
2024-09-22 14:34:14 +00:00
Kirill Chibisov 8dfd2e56ad
Make alacritty(1) config paths resemble alacritty(5)
This also fixes the escaping in alacritty(5) page.
2024-09-10 17:13:37 +03:00
Dimitri Sabadie 68f04024a3
Improve TermMode bitflags initialization 2024-09-07 00:25:56 +00:00
Hamir Mahal b125b99dd3
Update checkout CI action 2024-08-31 08:35:48 +00:00
philomathic_life 5abb4b7393
Remove duplicate clip-path from logo 2024-08-18 02:10:55 +00:00
张小白 91d034ff8b
Make ConPty creation fallible 2024-08-16 17:37:34 +00:00
Kirill Chibisov 102b89a8d9
Fix description in alacritty-bindings(5)
Man pages use the man page name as the first word in description. This
also aligns with other man pages we have.
2024-08-11 17:56:52 +03:00
Hamir Mahal d021a7b6f8
Unify string formatting
Some checks failed
CI / check-macos-x86_64 (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
CI / build (macos-latest) (push) Has been cancelled
2024-07-24 01:37:35 +00:00
Christian Duerr 6bd1674bd8
Restart config monitor on import change
Some checks failed
CI / check-macos-x86_64 (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
CI / build (macos-latest) (push) Has been cancelled
This patch checks the hash of the import paths on every config change
and restarts the config monitor whenever the current monitor's hash
diverges from the updated config's list of imports.

Closes #7981.
2024-07-21 11:49:47 +03:00
Kirill Chibisov c3075f189c
Document options which are not working everywhere yet
Some checks failed
CI / check-macos-x86_64 (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
CI / build (macos-latest) (push) Has been cancelled
This includes `window.position` and `window.resize_increments`.
2024-07-18 21:52:18 +03:00
Kirill Chibisov f5e02862ff Bump dependencies
Some checks failed
CI / check-macos-x86_64 (push) Has been cancelled
CI / build (windows-latest) (push) Has been cancelled
CI / build (macos-latest) (push) Has been cancelled
Update winit and clap to latest versions.
2024-07-17 11:02:31 +03:00
Kirill Chibisov 3504246c3f Bump MSRV to 1.74.0 2024-07-17 11:02:31 +03:00
Christian Duerr b3f0f68184
Fix search bug with wrapline on first character
This fixes an issue where an inline search in the left direction would
incorrectly assume that the first cell searched would not contain the
`WRAPLINE` flag, causing the second search for the match end to
terminate prematurely.

Fixes #8060.
2024-07-05 13:12:15 +03:00
Joshua Cao 5e6b92db85
Support relative imports in config file
Co-authored-by: Christian Duerr <contact@christianduerr.com>
2024-07-02 19:14:25 +00:00
Kirill Chibisov 138ac426bf
Use latest macOS image on CI (#8072)
Old macOS images are deprecated resulting in often failures, thus use 
latest macOS images available.

Also given that macOS is arm64 by default check x86_64 as extra job
and not arm64.
2024-07-02 19:55:26 +03:00
Kirill Chibisov da554e41f3
Bump winit to 0.30.3
Fixes #8046.
2024-06-23 17:56:19 +03:00
Kirill Chibisov 0d4ab7bca4
Bump winit to 0.30.2
Fixes #7969.
2024-06-16 10:37:33 +03:00
Kirill Chibisov 64ba0b8e91
Bump glutin to 0.32.0 2024-06-08 15:28:51 +03:00
Josh Soref cacdb5bb3b
Fix spelling errors 2024-05-24 17:32:11 +00:00
jadedpasta a89d4f50dc
Fix Kitty protocol reporting shifted keycodes
The [kitty keyboard protocol][1] explicitly requires that the
*un-shifted* version of the pressed key is used to report the primary
code point in `CSI code-point;modifiers u` sequences.

> Note that the codepoint used is always the lower-case (or more
> technically, un-shifted) version of the key. If the user presses, for
> example, ctrl+shift+a the escape code would be CSI 97;modifiers u. It
> must not be CSI 65; modifiers u.

Alacritty's current behavior is to report the shifted version when shift
is pressed, and the un-shifted version otherwise:

```console
 # Note that you'll have to kill Alacritty after running this to get
 # control back!
$ echo -ne '\x1b[>1u'; cat
^[[97;5u^[[65;6u
```

The above was generated by pressing `CTRL`+`a` followed by
`CTRL`+`SHIFT`+`a` after running the command. Here `97` and `65` are the
codepoints for `a` and `A` respectively.

This change makes Alacritty match the protocol (and Kitty's) behavior.
With this change applied, `97` is reported for both `CTRL`+`a` and
`CTRL`+`SHIFT`+`a`.

[1]: https://sw.kovidgoyal.net/kitty/keyboard-protocol/#key-codes
2024-05-23 18:36:14 +00:00
Christian Duerr 8dc27cebce
Fix error with missing imports
This fixes a regression, likely introduced in 5d173f6df, which changed
the severity of missing imports from `info` back to `error`.

The cause of this issue was a more complicated error handling mechanism,
which explicitly translated IO errors to a separate enum variant without
accounting for it in all scenarios.

While retrospectively this seems completely unnecessary to me, it did
mean shorter error messages in case the main config file was not found.
To preserve the benefits of both approaches, explicit handling for the
`NotFound` IO error has been added when loading the main configuration
file.
2024-05-23 18:16:34 +04:00
Jakob Hellermann e9d4ac2a6b
Fix IO safety violation from consequent dropping OwnedFd
This was not a _real_ violation and was _expected_, though for rust
to not complain clone FD properly...
2024-05-23 18:03:28 +04:00
Christian Duerr f04b16161b
Fix FD leak after closing child windows
This patch fixes an issue with signal handling where Alacritty would
permanently create one signal handling FD for each alacritty window
created by an instance. This FD was never released, causing a leak of
the FD.

Closes #7983.
2024-05-22 12:25:50 +00:00
EBADBEEF 38fed9a7c2
Fix mouse mode bindings with multiple actions
The following config was broken:
```
[mouse]
bindings = [
    { mouse = "Right", mods = "Shift", action = "Copy"            },
    { mouse = "Right", mods = "Shift", action = "ClearSelection"  },
]
```

Only the first action was applied. Change to allow more than one exact
match in mouse mode with shift held, but keep the logic to not allow
fallback search if any exact match was found.

Regression was introduced in 1a143d11.
2024-05-16 21:15:20 +00:00
Nathan Lilienthal 3cd35dfe7e
Ignore shell RCs for macOS zsh wrapper
Closes #7886.
2024-05-15 22:38:13 +00:00
Travis Finkenauer 3a7f21b00c
Add missing comma to alacritty(5) manpage 2024-05-12 20:01:41 +00:00
Giacomo Battaglia 7077a5f4cb
Allow requesting Bluetooth permission on macOS 2024-05-07 21:18:33 +04:00
Kirill Chibisov a21adf1a50
Fix user events for all windows not handled
The user events for all cases were not handled.

Fixes: 48c088a5 (Bump winit to 0.30.0)
Fixes: #7957.
2024-05-07 20:23:21 +04:00
Kirill Chibisov 48c088a50c
Bump winit to 0.30.0 2024-05-04 20:51:56 +04:00
Christian Duerr a77f77c48f
Fix shutdown of config monitor
This implements a coordinated shutdown of the config monitor by sending
an event to its thread and waiting for the thread to terminate.
2024-05-03 20:20:45 +00:00
Christian Duerr 82f41ed65c
Bump alacritty_terminal to 0.24.1-dev
This is only an update to the development version and does not represent
a stable release.
2024-05-03 19:47:41 +00:00
Aarni Koskela 26ed8e1b9d
Add config file locations into alacritty(5) 2024-05-03 21:44:17 +04:00
Owen Law ed3fac8a03
Add from_file_descriptors() to tty::unix 2024-05-01 05:27:54 +00:00
Christian Duerr ce800bfde2
Fix dynamic title override for multiple windows
This fixes an issue where Windows spawned after the initial one through
IPC or bindings would not update their title due to the initial window
having its title set through the CLI.

Title changes are still inhibited for additional windows when they are
spawned through `alacritty msg create-window` with the `--title` CLI
option added.

Closes #6836.
2024-04-23 15:42:16 +00:00
Kirill Chibisov 90054614c2
Fix IME preview overlapping text
Fix incorrect usage of the `flags` when drawing the preedit resulting
in setting the `flags`, but not actually reading the value back.

The logic to skip things was also used incorrectly, because the renderer
does that already based on the `WIDE_CHAR` flag on the cell.

Fixes: 67a433ceed (Skip whitespaces for wide chars in preedit)
2024-04-21 15:23:10 +04:00
Matt Fellenz 44dc9e19f4
Fix missing config import warning 2024-04-21 11:12:55 +00:00
William Viktorsson 18fff6a12b
Fix crash when trying to open a new tab on macOS
This fixes an issue where Alacritty would crash when trying to open a
new tab on macOS while having decorations disabled.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2024-04-20 23:11:46 +00:00
Kirill Chibisov d28868855a
Fix window being focused by default
Winit explicitly states that the window is not focused by default and
the `Focused` event will deliver the state later on.

Also start adding notable changes to alacritty_terminal in its own
CHANGELOG.

Closes #7866.
2024-04-18 22:58:15 +04:00
Foorack / Max Faxälv d4f2f8577f
Update homepage and repository in Cargo manifests 2024-03-31 01:57:09 +00:00
ZhiZe-ZG 6585d60408
Fix "Open Alacritty Here" on Windows 2024-03-28 15:17:41 +00:00
Christian Duerr 9af7eb1b31
Add version 0.13.2 to CHANGELOG
This is only an update to the development version and does not represent
a stable release.
2024-03-26 13:14:52 +04:00
Kirill Chibisov a3be505f24
Send ESC with Alt for unicode input
Make `Alt` send `ESC` for unicode input the way it's done for ASCII.
Previously it was disabled because of macOS, however on macOS we're
using the `option_as_alt` setting, which solves the original issue.

The `Alt` prefixing is still disabled for the unicode strings, like
when they come from the compose input.

Fixes #7852.
2024-03-24 19:07:20 +04:00
Christian Duerr cef95324c9
Fix msi installer build
This works around an issue where wix was pulling pre-release extensions
and thus breaking compatibility with our used wix version.
2024-03-24 04:00:41 +00:00
Kirill Chibisov fd1a3cc791
Fix kitty encoding used for char input without text
On Windows some key combinations for regular text input, like Ctrl+1
don't have any text attached, so they were generating the kitty escape
sequence even when they shouldn't.
2024-03-21 08:00:06 +04:00
Kirill Bulatov fe88aaa085
Allow setting terminal env vars via PTY options
Closes #7778.
2024-03-18 01:15:39 +00:00
Christian Duerr 14b53f18db Drop MSRV to 1.70.0 2024-03-18 02:04:54 +01:00
Christian Duerr 5b4e9c9a09 Bump dependencies
This bumps all dependencies that can be updated without introducing a
build failure.
2024-03-18 02:04:54 +01:00
Kirill Chibisov 1a73fe5fd2
Bump winit to 0.29.15 2024-03-14 01:01:21 +00:00
Christian Duerr 275726f784
Fix hint Select action for hyperlink escape
This fixes an issue where the `Select` action for hyperlink escape text
would select the entire line, instead of selecting only the hyperlink
itself.

It also changes the way hyperlinks with the same ID are highlighted,
removing the restriction of being on consecutive lines and instead
highlighting all visible cells that correspond to the matching
hyperlink.

Closes #7766.
2024-03-12 15:15:00 +04:00