Commit c3a5b77
authored
transient: add configurable delay before showing popup (#2187)
* transient: add configurable delay before showing popup
Add a configurable delay before the transient popup appears, similar
to Doom Emacs's which-key-idle-delay. The popup waits 500ms (default)
before showing; if the user completes the key sequence before the
timer fires, the popup never appears — avoiding flicker for fast
typists. Once the popup is already visible (navigating sub-menus),
subsequent keymaps show immediately.
New exported variable: lem/transient:*transient-popup-delay*
- 500 (default): 500ms delay
- 0 or nil: show immediately
* transient: document delay variables and rationale for global timer
Address code-contractor feedback:
- Expand *transient-popup-delay* docstring to describe user intent.
- Document why *transient-delay-timer* is held as global state:
it mirrors the lifecycle of *transient-popup-window* and must be
reachable from hide-transient and keymap-activate so a pending
popup can be canceled regardless of which call site aborts the
transient sequence — the contract's well-documented exception
to the functional-style rule.1 parent 94f40b8 commit c3a5b77
3 files changed
Lines changed: 47 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
17 | 39 | | |
18 | 40 | | |
19 | 41 | | |
20 | | - | |
| 42 | + | |
21 | 43 | | |
22 | 44 | | |
23 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
30 | 45 | | |
31 | 46 | | |
32 | 47 | | |
| |||
513 | 528 | | |
514 | 529 | | |
515 | 530 | | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
516 | 538 | | |
517 | 539 | | |
| 540 | + | |
518 | 541 | | |
519 | 542 | | |
520 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
0 commit comments