mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-28 13:53:10 +00:00
Fix order of operations in tilde comparison
The previous form of the statement evaluated to a constant comparison and couldn't have been what was actually intended.
This commit is contained in:
parent
4c0a119557
commit
097d6c3c5b
1 changed files with 1 additions and 1 deletions
|
@ -245,7 +245,7 @@ static bool compare_completions_by_duplicate_arguments(const completion_t &a,
|
|||
}
|
||||
|
||||
static bool compare_completions_by_tilde(const completion_t &a, const completion_t &b) {
|
||||
return a.completion.back() == L'~' < b.completion.back() == L'~';
|
||||
return (a.completion.back() == L'~') < (b.completion.back() == L'~');
|
||||
}
|
||||
/// Unique the list of completions, without perturbing their order.
|
||||
static void unique_completions_retaining_order(std::vector<completion_t> *comps) {
|
||||
|
|
Loading…
Reference in a new issue