Commit Graph
21 Commits
Author SHA1 Message Date
Bendik Aagaard LynghaugandClaude Fable 5.1 1c6a536026 clippy: clean up all warnings
Mostly `cargo clippy --fix`: needless borrows, redundant field names,
match -> if let, io::Error::other, Option::filter/map, let chains, c""
literals. By hand: drop unused impl lifetimes, a type alias for the
font preload map, Iterator::find in next_buffer, contains_key, and
allow new_ret_no_self where constructors intentionally return the
boxed/generic wrapper type.

No functional change; tests and release build unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-03 09:20:25 +00:00
Bendik Aagaard LynghaugandClaude Fable 5.1 42ffe9c492 cargo fmt
Pure formatting, no functional change.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-03 09:16:15 +00:00
Bendik Aagaard LynghaugandClaude Fable 5.1 2bed8b7fac launcher: make the prompt cursor consistently grapheme-based
set(), end() and move_cursor() used the byte length of the input as the
cursor bound while append/backspace/delete/clear_* index a grapheme table.
Any non-ASCII input (æøå, emoji) followed by End or typing past the end
indexed out of bounds and, with panic = "abort" in release, killed wldash.

While here:
- clamp Up so the selection can't run past the last row (every widget now
  reports its row count), and make mouse selection underflow-safe
- strip all desktop-entry field codes from Exec (%i %c %k ... and %% -> %),
  not just %f/%F/%u/%U
- report a failed spawn instead of panicking
- size the highlight colour table by chars, matching the drawing code

Adds unit tests for the prompt and the field-code stripping.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-03 09:15:53 +00:00
Kenny Levinsen 40aec97f79 Cargo format 2025-02-27 14:48:41 +01:00
Kenny Levinsen bc9ba0045c launcher: Support launch_cmd config 2025-01-12 22:51:45 +01:00
Kenny Levinsen 84c241a90e keyboard: Use xkb_common::keysyms 2023-11-10 14:00:06 +01:00
Kenny Levinsen 6351cc242d launcher: Use XDG_ACTIVATION_TOKEN for shell cmds 2023-04-04 01:53:29 +02:00
Kenny Levinsen 66e66e19ad launcher: Cache desktop files 2023-04-04 01:53:02 +02:00
Kenny Levinsen 5097faab66 launcher: Save prompt on exit 2023-02-14 00:28:40 +01:00
Kenny Levinsen b09f642fd6 Avoid panic on very long prompt lines 2023-02-14 00:28:40 +01:00
Kenny Levinsen 353ed1f189 launcher: Shrink margin 2023-02-08 22:57:06 +01:00
Kenny Levinsen 6e90b1f0e8 More better 2023-02-08 22:53:41 +01:00
Kenny Levinsen 3c69a31030 calc: Store history 2023-02-07 00:36:06 +01:00
Kenny Levinsen b9f4e74062 calc: Improve history 2023-02-06 18:57:34 +01:00
Kenny Levinsen 6f0ca36826 Moar speed 2023-02-06 18:34:07 +01:00
Kenny Levinsen b49b9e9764 More stuff 2023-02-02 23:52:59 +01:00
Kenny Levinsen 7593cd48a4 Add calendar, refactor more 2023-01-16 00:25:34 +01:00
Kenny Levinsen 3a40bb18c5 Refactor slightly 2023-01-13 21:53:07 +01:00
Kenny Levinsen b2a9475e4c cargo fmt 2023-01-12 00:13:27 +01:00
Kenny Levinsen 0a4544a608 launcher: Add ctrl k/u handling 2023-01-11 23:54:14 +01:00
Kenny Levinsen 8e80c0a69c Initial commit 2023-01-11 00:28:54 +01:00