diff --git a/src/Makefile b/src/Makefile index 2329d26d..eef5a2c2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -87,7 +87,7 @@ kak$(suffix) : $(objects) .version.o .version.o: .version.cc $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< - + .version.cc: FORCE @printf "%s" 'namespace Kakoune { const char* version = "$(version)"; }' > .version.cc.tmp @if cmp -s .version.cc.tmp .version.cc; then rm .version.cc.tmp; else mv .version.cc.tmp .version.cc; fi diff --git a/src/face_registry.cc b/src/face_registry.cc index 13d90558..8b13e439 100644 --- a/src/face_registry.cc +++ b/src/face_registry.cc @@ -98,7 +98,7 @@ void FaceRegistry::add_face(StringView name, StringView facedesc, bool override) if (name == facedesc) throw runtime_error(format("cannot alias face '{}' to itself", name)); - for (auto it = m_faces.find(facedesc); + for (auto it = m_faces.find(facedesc); it != m_faces.end() and not it->value.alias.empty(); it = m_faces.find(it->value.alias)) { diff --git a/src/highlighters.cc b/src/highlighters.cc index 0fc69826..b4509d76 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -497,7 +497,7 @@ std::unique_ptr create_dynamic_regex_highlighter(HighlighterParamet std::decay_t>>( std::move(regex_getter), std::move(face_getter)); }; - auto get_face = [faces](const Context& context){ return faces;; }; + auto get_face = [faces](const Context& context){ return faces; }; CommandParser parser{params[0]}; auto token = parser.read_token(true); diff --git a/src/input_handler.cc b/src/input_handler.cc index 11f2d5e3..7ca4afc0 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -289,7 +289,7 @@ public: { auto pop_if_single_command = on_scope_end([this] { if (m_state == State::SingleCommand and enabled()) - pop_mode(); + pop_mode(); else if (m_state == State::SingleCommand) m_state = State::PopOnEnabled; }); diff --git a/src/normal.cc b/src/normal.cc index f0ab0155..eb71ce4a 100644 --- a/src/normal.cc +++ b/src/normal.cc @@ -837,7 +837,7 @@ void extend_to_next_matches(Context& context, const Regex& regex, int count) --main_index; } if (new_sels.empty()) - throw runtime_error{"All selections wrapped"}; + throw runtime_error{"All selections wrapped"}; selections.set(std::move(new_sels), main_index); new_sels.clear(); diff --git a/src/option_types.hh b/src/option_types.hh index d3fd9364..0cd7ef7e 100644 --- a/src/option_types.hh +++ b/src/option_types.hh @@ -343,7 +343,7 @@ inline String option_to_string(const PrefixedList& opt) template inline PrefixedList option_from_strings(Meta::Type>, ConstArrayView strs) { - return {option_from_string(Meta::Type

{}, strs[0]), + return {option_from_string(Meta::Type

{}, strs[0]), option_from_strings(Meta::Type>{}, strs.subrange(1))}; } diff --git a/src/regex_impl.hh b/src/regex_impl.hh index 73f1e016..9e87f2c1 100644 --- a/src/regex_impl.hh +++ b/src/regex_impl.hh @@ -368,7 +368,7 @@ private: if (pos == config.end) return StepResult::Failed; return is_ctype((CharacterType)inst.param, *pos) ? - StepResult::Consumed : StepResult::Failed;; + StepResult::Consumed : StepResult::Failed; case CompiledRegex::LineStart: if (not is_line_start(pos, config)) return StepResult::Failed;