Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

console.lua: focus the default item after emptying the input line #15617

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

guidocella
Copy link
Contributor

When console is opened with selectable items and a default item, the default item is placed at the center. But if you type something and then clear the line, the first item becomes the selected one. Make it select the default item and place it in the center in this case too.

When console is opened with selectable items and a default item, the
default item is placed at the center. But if you type something and then
clear the line, the first item becomes the selected one. Make it select
the default item and place it in the center in this case too.
Copy link

github-actions bot commented Jan 2, 2025

Download the artifacts for this pull request:

Windows
macOS

The lines in populate_log_with_matches()

if selected_match < first_match_to_print then
    first_match_to_print = selected_match

will set first_match_to_print to 1 even if it is not set here since
handle_edit() sets selected_match = 1.
@kasper93 kasper93 merged commit 00ff6e5 into mpv-player:master Jan 3, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants