-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pretty up
KeyCombos
representation in user-facing errors (#193)
* Self review * Improve user-facing keycombo representation
- Loading branch information
1 parent
0a6c6e1
commit e618e88
Showing
8 changed files
with
164 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/opts/tests/snapshots/inlyne__opts__tests__error_msg__basic_equality.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
source: src/opts/tests/error_msg.rs | ||
description: "\n[keybindings]\nbase = [\n [\"ToTop\", \"a\"],\n [\"ZoomReset\", \"a\"],\n]\n" | ||
expression: err | ||
--- | ||
A keycombo starts with another keycombo making it unreachable | ||
Combo: a | ||
Prefix: a |
11 changes: 11 additions & 0 deletions
11
src/opts/tests/snapshots/inlyne__opts__tests__error_msg__fix_this_sucky_error_message.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
source: src/opts/tests/error_msg.rs | ||
description: "\n[keybindings]\nbase = [\n [\"ToBottom\", { key = \" \", mod = [\"Ctrl\", \"shift\"] }],\n [\"ZoomOut\", [{ key = \" \", mod = [\"ctrl\", \"shift\"] }, \"Enter\"]],\n]\n" | ||
expression: err | ||
--- | ||
TOML parse error at line 4, column 5 | ||
| | ||
4 | ["ToBottom", { key = " ", mod = ["Ctrl", "shift"] }], | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
data did not match any variant of untagged enum ModifiedKeyOrModifiedKeys | ||
|
8 changes: 8 additions & 0 deletions
8
src/opts/tests/snapshots/inlyne__opts__tests__error_msg__special_prefix.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
source: src/opts/tests/error_msg.rs | ||
description: "\n[keybindings]\nbase = [\n [\"ToBottom\", { key = \"Space\", mod = [\"Ctrl\", \"Shift\"] }],\n [\"ZoomOut\", [{ key = \"Space\", mod = [\"Ctrl\", \"Shift\"] }, \"Enter\", 39]],\n]\n" | ||
expression: err | ||
--- | ||
A keycombo starts with another keycombo making it unreachable | ||
Combo: <Ctrl+Shift+Space><Enter><scan code: 39> | ||
Prefix: <Ctrl+Shift+Space> |