mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-29 18:51:15 -03:00
Lint Cleanup
This remove some stores that clang assures me are very dead. And an assert() for an unlikely NULL pointer dereference I can't quite figure out.
This commit is contained in:
@@ -128,9 +128,9 @@ line_t pager_t::completion_print_item(const wcstring &prefix, const comp_t *c, s
|
||||
{
|
||||
written += print_max(L" ", packed_color, 1, false, &line_data);
|
||||
}
|
||||
written += print_max(L"(", packed_color, 1, false, &line_data);
|
||||
written += print_max(c->desc, packed_color, desc_width, false, &line_data);
|
||||
written += print_max(L")", packed_color, 1, false, &line_data);
|
||||
print_max(L"(", packed_color, 1, false, &line_data);
|
||||
print_max(c->desc, packed_color, desc_width, false, &line_data);
|
||||
print_max(L")", packed_color, 1, false, &line_data);
|
||||
} else {
|
||||
while (written < width) {
|
||||
written += print_max(L" ", 0, 1, false, &line_data);
|
||||
@@ -504,8 +504,7 @@ bool pager_t::completion_try_print(size_t cols, const wcstring &prefix, const co
|
||||
// We limit the width to term_width - 1.
|
||||
int search_field_written = print_max(SEARCH_FIELD_PROMPT, highlight_spec_normal,
|
||||
term_width - 1, false, search_field);
|
||||
search_field_written +=
|
||||
print_max(search_field_text, highlight_modifier_force_underline,
|
||||
print_max(search_field_text, highlight_modifier_force_underline,
|
||||
term_width - search_field_written - 1, false, search_field);
|
||||
}
|
||||
}
|
||||
@@ -611,7 +610,7 @@ bool pager_t::select_next_completion_in_direction(selection_direction_t directio
|
||||
}
|
||||
|
||||
// Ok, we had something selected already. Select something different.
|
||||
size_t new_selected_completion_idx = selected_completion_idx;
|
||||
size_t new_selected_completion_idx;
|
||||
if (!selection_direction_is_cardinal(direction)) {
|
||||
// Next, previous, or deselect, all easy.
|
||||
if (direction == direction_deselect) {
|
||||
|
||||
Reference in New Issue
Block a user