mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03:00
Explain edge case in select_completion_in_direction()
No functional change.
This commit is contained in:
@@ -750,7 +750,10 @@ bool pager_t::select_next_completion_in_direction(selection_motion_t direction,
|
||||
// rendering.cols is the first suggested visible completion; add the visible completion
|
||||
// count to that to get the last one.
|
||||
size_t visible_row_count = rendering.row_end - rendering.row_start;
|
||||
if (visible_row_count == 0 || selected_completion_idx == PAGER_SELECTION_NONE) {
|
||||
if (visible_row_count == 0) {
|
||||
return true; // this happens if there was no room to draw the pager
|
||||
}
|
||||
if (selected_completion_idx == PAGER_SELECTION_NONE) {
|
||||
return true; // this should never happen but be paranoid
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user