small code tweak
This commit is contained in:
parent
9c99c238e8
commit
dca05ecc73
|
@ -236,9 +236,8 @@ void do_join(Context& context)
|
||||||
|
|
||||||
void do_indent(Context& context)
|
void do_indent(Context& context)
|
||||||
{
|
{
|
||||||
const char* spaces = " ";
|
size_t width = context.options()["indentwidth"].as_int();
|
||||||
int width = std::min(context.options()["indentwidth"].as_int(), 16);
|
String indent(' ', width);
|
||||||
String indent(spaces, spaces + width);
|
|
||||||
|
|
||||||
Editor& editor = context.editor();
|
Editor& editor = context.editor();
|
||||||
SelectionAndCapturesList sels = editor.selections();
|
SelectionAndCapturesList sels = editor.selections();
|
||||||
|
|
|
@ -23,7 +23,7 @@ public:
|
||||||
String(std::string content) : m_content(std::move(content)) {}
|
String(std::string content) : m_content(std::move(content)) {}
|
||||||
String(const String& string) = default;
|
String(const String& string) = default;
|
||||||
String(String&& string) = default;
|
String(String&& string) = default;
|
||||||
explicit String(char content) : m_content(std::string() + content) {}
|
explicit String(char content, size_t count = 1) : m_content(count, content) {}
|
||||||
template<typename Iterator>
|
template<typename Iterator>
|
||||||
String(Iterator begin, Iterator end) : m_content(begin, end) {}
|
String(Iterator begin, Iterator end) : m_content(begin, end) {}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user