File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -21,18 +21,24 @@ M.execute_anon = function()
2121 local file_type = vim .bo .filetype
2222 local default_username = OrgManager :get_default_username ()
2323
24- if file_type ~= " apex" then
24+ if file_type == " apex" then
25+ if path == " " then
26+ Debug :log (" execute_anon.lua" , " Executing anonymous Apex script for current buffer..." )
27+ path = vim .fn .expand (" %" )
28+ if not default_username then
29+ Util .notify_default_org_not_set ()
30+ return
31+ end
32+ else
33+ Debug :log (" execute_anon.lua" , " Executing anonymous Apex script for file..." )
34+ end
35+ else
2536 local message = " Not an Apex script file"
2637 Debug :log (" execute_anon.lua" , message )
2738 vim .notify (message , vim .log .levels .ERROR )
2839 return
2940 end
3041
31- if not default_username then
32- Util .notify_default_org_not_set ()
33- return
34- end
35-
3642 Popup :create_popup ({})
3743 Popup :write_to_popup (" Executing anonymous Apex script..." )
3844 local executable = Config :get_options ().sf_executable
@@ -73,4 +79,4 @@ M.execute_anon = function()
7379 end
7480end
7581
76- return M
82+ return M
You can’t perform that action at this time.
0 commit comments