summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2020-05-02 13:02:10 +1000
committerMaxime Coste <mawww@kakoune.org>2020-05-02 13:02:10 +1000
commit2fca4e564304ee69b33711084ceeefae397619cd (patch)
treef44597c62ee4d29137b78a24a36650712e89608c /src
parentccecd5bd8e871b7aa89568609fd4ba7c50fd52ad (diff)
Fix traling whitespaces
Diffstat (limited to 'src')
-rw-r--r--src/commands.cc2
-rw-r--r--src/highlighters.cc4
-rw-r--r--src/line_modification.cc2
3 files changed, 4 insertions, 4 deletions
diff --git a/src/commands.cc b/src/commands.cc
index 30113af2..accb3e37 100644
--- a/src/commands.cc
+++ b/src/commands.cc
@@ -480,7 +480,7 @@ void do_write_buffer(Context& context, Optional<String> filename, WriteFlags fla
const bool is_readonly = (bool)(context.buffer().flags() & Buffer::Flags::ReadOnly);
// if the buffer is in read-only mode and we try to save it directly
// or we try to write to it indirectly using e.g. a symlink, throw an error
- if (is_file and is_readonly and
+ if (is_file and is_readonly and
(not filename or real_path(*filename) == buffer.name()))
throw runtime_error("cannot overwrite the buffer when in readonly mode");
diff --git a/src/highlighters.cc b/src/highlighters.cc
index 298e6b33..ecc84481 100644
--- a/src/highlighters.cc
+++ b/src/highlighters.cc
@@ -879,8 +879,8 @@ struct WrapHighlighter : Highlighter
auto find_split_pos = [&](SplitPos start_pos, auto is_word) -> Optional<SplitPos> {
if (start_pos.byte == 0)
return {};
- const char* it = &content[pos.byte];
- // split at current position if is a word boundary
+ const char* it = &content[pos.byte];
+ // split at current position if is a word boundary
if (not is_word(utf8::codepoint(it, content.end()), {'_'}))
return pos;
// split at last word boundary if the word is shorter than our wrapping width
diff --git a/src/line_modification.cc b/src/line_modification.cc
index 01ad22bf..47e11e64 100644
--- a/src/line_modification.cc
+++ b/src/line_modification.cc
@@ -151,7 +151,7 @@ void LineRangeSet::add_range(LineRange range, FunctionRef<void (LineRange)> on_n
[](LineRange range, LineCount line) { return range.end < line; });
if (it == end() or it->begin > range.end)
on_new_range(range);
- else
+ else
{
auto pos = range.begin;
while (it != end() and it->begin <= range.end)