ソースを参照

fix(main): trigger auto_activate_major_mode after cli file load

Bernardo Magri 1 ヶ月 前
コミット
f05e3a70c1
1 ファイル変更5 行追加1 行削除
  1. 5 1
      src/main.cpp

+ 5 - 1
src/main.cpp

@@ -86,7 +86,11 @@ int main(int argc, char* argv[]) {
 
         // Load initial file if provided
         if (!filename.empty()) {
-            core.load_file(filename);
+            if (core.load_file(filename)) {
+                if (core.lua_api()) {
+                    core.lua_api()->execute("auto_activate_major_mode()");
+                }
+            }
         }
 
         // Run main loop