diff --git a/src/file.cc b/src/file.cc index 49fa00e53..420c957b4 100644 --- a/src/file.cc +++ b/src/file.cc @@ -394,7 +394,7 @@ Vector list_files(StringView dirname, Filter filter) if (not dir) return {}; - auto closeDir = on_scope_end([=]{ closedir(dir); }); + auto close_dir = on_scope_end([dir]{ closedir(dir); }); Vector result; while (dirent* entry = readdir(dir)) diff --git a/src/input_handler.cc b/src/input_handler.cc index 07175af9d..9a4d8c839 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -1480,7 +1480,7 @@ void InputHandler::handle_key(Key key) { const bool was_recording = is_recording(); ++m_handle_key_level; - auto dec = on_scope_end([&]{ --m_handle_key_level; }); + auto dec = on_scope_end([this]{ --m_handle_key_level; }); auto keymap_mode = current_mode().keymap_mode(); KeymapManager& keymaps = m_context.keymaps();