Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/logicmoo/metta-wam
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSPoon committed Feb 17, 2025
2 parents 2bc205a + 19d08e5 commit 513a8e3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libraries/lsp_server_metta/prolog/lsp_metta_code_actions.pl
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,11 @@
load_metta_code(For, Path, Code, Result) :-
catch_with_backtrace((
ignore(current_self(Self)),
wots(Out, ignore(do_metta(file(lsp(Path)), For, Self, Code, _LastAnswer))),
sformat(Result, "; ~w", [Out])
wots(Out, ignore(do_metta(file(Path), For, Self, Code, LastAnswer))),
( Out == ""
-> sformat(Result, "~w", [LastAnswer])
; sformat(Result, "~w ; ~w", [LastAnswer, Out])
)
), Error, (
sformat(Result, "~w ; Error: ~q", [Code, Error])
)), !.
Expand Down

0 comments on commit 513a8e3

Please sign in to comment.