Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lotus-engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,11 @@ namespace fcitx {
const Configuration* LotusEngine::getSubConfig(const std::string& path) const {
if (path == "custom_keymap")
return &customKeymap_;
#if __cplusplus >= 202002L
if (path.starts_with(MacroPrefix)) {
#else
if (stringutils::startsWith(path, MacroPrefix)) {
#endif
const auto imName = path.substr(strlen(MacroPrefix));
if (auto iter = macroTables_.find(imName); iter != macroTables_.end())
return &iter->second;
Expand Down Expand Up @@ -360,7 +364,11 @@ namespace fcitx {
customKeymap_.load(config, true);
safeSaveAsIni(customKeymap_, CustomKeymapFile);
refreshEngine();
#if __cplusplus >= 202002L
} else if (path.starts_with(MacroPrefix)) {
#else
} else if (stringutils::startsWith(path, MacroPrefix)) {
#endif
const auto imName = path.substr(strlen(MacroPrefix));
if (auto iter = macroTables_.find(imName); iter != macroTables_.end()) {
iter->second.load(config, true);
Expand Down
Loading