Expand description
Utility functions for event handling.
Functionsยง
- byte_
index_ for_ char - What: Convert a character index to a byte index for slicing.
- char_
count - What: Return the number of Unicode scalar values (characters) in the input.
- compute_
updates_ filtered_ indices - What: Compute visible updates indices for a slash-filter query.
- compute_
updates_ modal_ scroll_ for_ selection - What: Compute updates-modal scroll offset that keeps the selected entry visible.
- find_
in_ install - What: Advance selection in the Install pane to the next/previous item matching the pane-find pattern.
- find_
in_ recent - What: Advance selection in the Recent pane to the next/previous match of the pane-find pattern.
- matches_
any - What: Check if a key event matches any chord in a list, handling Shift+char edge cases.
- maybe_
request_ news_ content - Request news content fetch if not cached or loading. Implements 0.5 second debounce - only requests after user stays on item for 0.5 seconds.
- move_
news_ selection - Move news selection by delta, keeping it in view.
- move_
sel_ cached_ with_ vote_ state - What: Move selection and queue live AUR vote-state check for selected package.
- queue_
selected_ aur_ vote_ state_ check - What: Queue a live AUR vote-state check for the currently selected result.
- refresh_
downgrade_ details - What: Ensure details reflect the selected item in the Downgrade pane.
- refresh_
install_ details - What: Ensure details reflect the selected item in the Install pane.
- refresh_
remove_ details - What: Ensure details reflect the selected item in the Remove pane.
- refresh_
selected_ details - What: Ensure details reflect the currently selected result.
- update_
news_ url - Synchronize details URL and content with currently selected news item. Also triggers content fetching if channel is provided and content is not cached.