Reformat all .cpp files

This commit is contained in:
ridiculousfish 2019-11-09 16:07:33 -08:00
parent 82227b8854
commit 7bd134f795
4 changed files with 8 additions and 6 deletions

View file

@ -344,7 +344,7 @@ int builtin_complete(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
} else {
parser.libdata().builtin_complete_recursion_level++;
assert(!parser.libdata().builtin_complete_current_commandline);
if (!have_do_complete_param)
if (!have_do_complete_param)
parser.libdata().builtin_complete_current_commandline = true;
std::vector<completion_t> comp;

View file

@ -1535,7 +1535,8 @@ void completer_t::perform() {
current_argument = current_token;
if (tokens.size() >= 2) {
tok_t prev_tok = tokens.at(tokens.size() - 2);
if (prev_tok.type == token_type_t::string) previous_argument = prev_tok.get_source(cmd);
if (prev_tok.type == token_type_t::string)
previous_argument = prev_tok.get_source(cmd);
}
}

View file

@ -303,7 +303,8 @@ struct history_impl_t {
// item_at_index until a call to resolve_pending(). Pending items are tracked with an offset
// into the array of new items, so adding a non-pending item has the effect of resolving all
// pending items.
void add(const wcstring &str, history_identifier_t ident = 0, bool pending = false, bool save = true);
void add(const wcstring &str, history_identifier_t ident = 0, bool pending = false,
bool save = true);
// Remove a history item.
void remove(const wcstring &str);
@ -399,7 +400,8 @@ void history_impl_t::save_unless_disabled() {
countdown_to_vacuum--;
}
void history_impl_t::add(const wcstring &str, history_identifier_t ident, bool pending, bool do_save) {
void history_impl_t::add(const wcstring &str, history_identifier_t ident, bool pending,
bool do_save) {
time_t when = time(NULL);
// Big hack: do not allow timestamps equal to our boundary date. This is because we include
// items whose timestamps are equal to our boundary when reading old history, so we can catch

View file

@ -645,8 +645,7 @@ static void s_update(screen_t *scr, const wcstring &left_prompt, const wcstring
// Determine how many lines have stuff on them; we need to clear lines with stuff that we don't
// want.
const size_t lines_with_stuff = std::max(actual_lines_before_reset, scr->actual.line_count());
if (scr->desired.line_count() < lines_with_stuff)
need_clear_screen = true;
if (scr->desired.line_count() < lines_with_stuff) need_clear_screen = true;
if (left_prompt != scr->actual_left_prompt) {
s_move(scr, 0, 0);