Style fixes
This commit is contained in:
parent
047488a8da
commit
63878b03c5
|
@ -318,8 +318,8 @@ ByteCoord Buffer::do_erase(ByteCoord begin, ByteCoord end)
|
|||
{
|
||||
kak_assert(is_valid(begin));
|
||||
kak_assert(is_valid(end));
|
||||
String prefix = m_lines[begin.line].substr(0, begin.column);
|
||||
String suffix = m_lines[end.line].substr(end.column);
|
||||
StringView prefix = m_lines[begin.line].substr(0, begin.column);
|
||||
StringView suffix = m_lines[end.line].substr(end.column);
|
||||
String new_line = prefix + suffix;
|
||||
|
||||
ByteCoord next;
|
||||
|
|
|
@ -260,8 +260,7 @@ TokenList parse(StringView line)
|
|||
String token = line.substr(token_start, pos - token_start);
|
||||
static const Regex regex{R"(\\([ \t;\n]))"};
|
||||
result.emplace_back(Token::Type::Raw, token_start, pos,
|
||||
boost::regex_replace(token, regex,
|
||||
"\\1"));
|
||||
boost::regex_replace(token, regex, "\\1"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ InsertCompletion complete_filename(const Buffer& buffer, ByteCoord cursor_pos,
|
|||
}
|
||||
|
||||
InsertCompletion complete_option(const Buffer& buffer, ByteCoord cursor_pos,
|
||||
OptionManager& options, const String& option_name)
|
||||
OptionManager& options, StringView option_name)
|
||||
{
|
||||
const StringList& opt = options[option_name].get<StringList>();;
|
||||
if (opt.empty())
|
||||
|
@ -151,7 +151,7 @@ InsertCompletion complete_option(const Buffer& buffer, ByteCoord cursor_pos,
|
|||
|
||||
InsertCompletion complete_line(const Buffer& buffer, ByteCoord cursor_pos)
|
||||
{
|
||||
String prefix = buffer[cursor_pos.line].substr(0_byte, cursor_pos.column);
|
||||
StringView prefix = buffer[cursor_pos.line].substr(0_byte, cursor_pos.column);
|
||||
StringList res;
|
||||
for (LineCount l = 0_line; l < buffer.line_count(); ++l)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user