Fix some trailing spaces and a tab that sneaked into the code base
This commit is contained in:
parent
6ee68b5b08
commit
71a1893a5e
|
@ -105,7 +105,7 @@ DisplayLine::iterator DisplayLine::split(iterator it, ColumnCount count)
|
||||||
return m_atoms.insert(it, std::move(atom));
|
return m_atoms.insert(it, std::move(atom));
|
||||||
}
|
}
|
||||||
auto pos = utf8::advance(get_iterator(it->buffer(), it->begin()),
|
auto pos = utf8::advance(get_iterator(it->buffer(), it->begin()),
|
||||||
get_iterator(it->buffer(), it->end()),
|
get_iterator(it->buffer(), it->end()),
|
||||||
count).coord();
|
count).coord();
|
||||||
return split(it, pos);
|
return split(it, pos);
|
||||||
}
|
}
|
||||||
|
|
|
@ -291,7 +291,7 @@ struct HashMap
|
||||||
constexpr bool empty() const { return m_items.empty(); }
|
constexpr bool empty() const { return m_items.empty(); }
|
||||||
constexpr void reserve(size_t size)
|
constexpr void reserve(size_t size)
|
||||||
{
|
{
|
||||||
m_items.reserve(size);
|
m_items.reserve(size);
|
||||||
m_index.reserve(size);
|
m_index.reserve(size);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ String to_json(Color color)
|
||||||
String to_json(Attribute attributes)
|
String to_json(Attribute attributes)
|
||||||
{
|
{
|
||||||
struct Attr { Attribute attr; StringView name; }
|
struct Attr { Attribute attr; StringView name; }
|
||||||
attrs[] {
|
attrs[] {
|
||||||
{ Attribute::Exclusive, "exclusive" },
|
{ Attribute::Exclusive, "exclusive" },
|
||||||
{ Attribute::Underline, "underline" },
|
{ Attribute::Underline, "underline" },
|
||||||
{ Attribute::Reverse, "reverse" },
|
{ Attribute::Reverse, "reverse" },
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#include "string_utils.hh"
|
#include "string_utils.hh"
|
||||||
#include "vector.hh"
|
#include "vector.hh"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
namespace Kakoune
|
namespace Kakoune
|
||||||
{
|
{
|
||||||
|
@ -390,7 +390,7 @@ private:
|
||||||
std::sort(ranges.begin(), ranges.end(),
|
std::sort(ranges.begin(), ranges.end(),
|
||||||
[](auto& lhs, auto& rhs) { return lhs.min < rhs.min; });
|
[](auto& lhs, auto& rhs) { return lhs.min < rhs.min; });
|
||||||
|
|
||||||
// merge overlapping ranges
|
// merge overlapping ranges
|
||||||
auto pos = ranges.begin();
|
auto pos = ranges.begin();
|
||||||
for (auto next = pos+1; next != ranges.end(); ++next)
|
for (auto next = pos+1; next != ranges.end(); ++next)
|
||||||
{
|
{
|
||||||
|
|
|
@ -173,7 +173,7 @@ public:
|
||||||
|
|
||||||
uint32_t size() const
|
uint32_t size() const
|
||||||
{
|
{
|
||||||
kak_assert(m_write_pos >= header_size);
|
kak_assert(m_write_pos >= header_size);
|
||||||
uint32_t res;
|
uint32_t res;
|
||||||
memcpy(&res, m_stream.data() + sizeof(MessageType), sizeof(uint32_t));
|
memcpy(&res, m_stream.data() + sizeof(MessageType), sizeof(uint32_t));
|
||||||
return res;
|
return res;
|
||||||
|
@ -181,7 +181,7 @@ public:
|
||||||
|
|
||||||
MessageType type() const
|
MessageType type() const
|
||||||
{
|
{
|
||||||
kak_assert(m_write_pos >= header_size);
|
kak_assert(m_write_pos >= header_size);
|
||||||
return *reinterpret_cast<const MessageType*>(m_stream.data());
|
return *reinterpret_cast<const MessageType*>(m_stream.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -353,7 +353,7 @@ find_surrounding(const Container& container, Iterator pos,
|
||||||
first = utf8::previous(first, container.begin());
|
first = utf8::previous(first, container.begin());
|
||||||
|
|
||||||
if (auto res = find_opening(first+1, container, opening, closing, level, nestable))
|
if (auto res = find_opening(first+1, container, opening, closing, level, nestable))
|
||||||
first = (flags & ObjectFlags::Inner) ? res->second : res->first;
|
first = (flags & ObjectFlags::Inner) ? res->second : res->first;
|
||||||
else
|
else
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
@ -370,7 +370,7 @@ find_surrounding(const Container& container, Iterator pos,
|
||||||
|
|
||||||
if (auto res = find_closing(last, container, opening, closing, level, nestable))
|
if (auto res = find_closing(last, container, opening, closing, level, nestable))
|
||||||
last = (flags & ObjectFlags::Inner) ? utf8::previous(res->first, container.begin())
|
last = (flags & ObjectFlags::Inner) ? utf8::previous(res->first, container.begin())
|
||||||
: utf8::previous(res->second, container.begin());
|
: utf8::previous(res->second, container.begin());
|
||||||
else
|
else
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,7 +191,7 @@ public:
|
||||||
const char* data() const { return is_long() ? l.ptr : s.string; }
|
const char* data() const { return is_long() ? l.ptr : s.string; }
|
||||||
char* data() { return is_long() ? l.ptr : s.string; }
|
char* data() { return is_long() ? l.ptr : s.string; }
|
||||||
|
|
||||||
template<bool copy = true>
|
template<bool copy = true>
|
||||||
void reserve(size_t new_capacity);
|
void reserve(size_t new_capacity);
|
||||||
void set_size(size_t size);
|
void set_size(size_t size);
|
||||||
void force_size(size_t new_size);
|
void force_size(size_t new_size);
|
||||||
|
|
|
@ -21,7 +21,7 @@ static WordList get_words(StringView content, ConstArrayView<Codepoint> extra_wo
|
||||||
{
|
{
|
||||||
if (is_word(*it))
|
if (is_word(*it))
|
||||||
{
|
{
|
||||||
const char* word = it.base();
|
const char* word = it.base();
|
||||||
while (++it != content.end() and is_word(*it))
|
while (++it != content.end() and is_word(*it))
|
||||||
{}
|
{}
|
||||||
res.emplace_back(word, it.base());
|
res.emplace_back(word, it.base());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user