diff --git a/src/main.cc b/src/main.cc index f022361d..88ea11a0 100644 --- a/src/main.cc +++ b/src/main.cc @@ -54,7 +54,7 @@ void register_env_vars() { return context.buffer().display_name(); } }, { "buffile", - [](StringView name, const Context& context) + [](StringView name, const Context& context) -> String { return context.buffer().name(); } }, { "buflist", @@ -93,11 +93,11 @@ void register_env_vars() { return context.client().get_env_var(name.substr(11_byte)).str(); } }, { "session", - [](StringView name, const Context& context) + [](StringView name, const Context& context) -> String { return Server::instance().session(); } }, { "client", - [](StringView name, const Context& context) + [](StringView name, const Context& context) -> String { return context.name(); } }, { "cursor_line", diff --git a/src/string.hh b/src/string.hh index 1f622101..fba20f15 100644 --- a/src/string.hh +++ b/src/string.hh @@ -106,7 +106,7 @@ public: using Content = std::basic_string, Allocator>; - String() = default; + String() {} String(const char* content) : m_data(content) {} explicit String(char content, CharCount count = 1) : m_data((size_t)(int)count, content) {} explicit String(Codepoint cp, CharCount count = 1)