console.lua: limit how many completions are printed to the terminal#18273
Open
guidocella wants to merge 1 commit into
Open
console.lua: limit how many completions are printed to the terminal#18273guidocella wants to merge 1 commit into
guidocella wants to merge 1 commit into
Conversation
kasper93
reviewed
Jul 17, 2026
|
|
||
| if not dim_completions then | ||
| for i, completion in ipairs(completion_buffer) do | ||
| for i = math.max(1, #completion_buffer - 999), #completion_buffer do |
Member
There was a problem hiding this comment.
Can't we just trim it to 2-3 rows of completions, instead of fixed number?
Contributor
Author
There was a problem hiding this comment.
Made it calculate how many terminal cells are occupied vs how many are available. This also has the consequence of showing the first completions instead of the last ones.
guidocella
force-pushed
the
console-complete
branch
2 times, most recently
from
July 17, 2026 13:54
0f4dd53 to
86a688b
Compare
guidocella
force-pushed
the
console-complete
branch
from
July 17, 2026 15:12
86a688b to
3147a3d
Compare
This prevents mpv from freezing e.g. when completing very large directories.
guidocella
force-pushed
the
console-complete
branch
from
July 17, 2026 15:23
3147a3d to
289ccb6
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This prevents mpv from freezing e.g. when completing very large directories.