summaryrefslogtreecommitdiff
path: root/save.pl
diff options
context:
space:
mode:
Diffstat (limited to 'save.pl')
-rw-r--r--save.pl15
1 files changed, 6 insertions, 9 deletions
diff --git a/save.pl b/save.pl
index fd51325..0e87699 100644
--- a/save.pl
+++ b/save.pl
@@ -38,12 +38,11 @@ init :-
added(S) :-
dif(S, 0),
- !,
send(@display, report, error,
'Files could not be added to index. Ensure Git is in PATH
and that the current directory is a Git repository.').
-added(_) :-
+added(0) :-
%send(@pce, load_defaults, 'Defaults'),
% Right side.
@@ -52,9 +51,7 @@ added(_) :-
refresh,
% Left side.
- send(@dialog, append, text('Comment (optional):',
- left,
- bold)),
+ send(@dialog, append, text('Comment (optional):', left, bold)),
send(@dialog, append, @editor),
send(@dialog, append, @save_button),
send(@dialog, append, @refresh_button),
@@ -118,14 +115,14 @@ commit(Msg) :-
process_create(path(git), ['commit', '-m', Msg],
[process(PID)]),
process_wait(PID, S),
- commited(S).
+ committed(S).
-commited(S) :-
+committed(S) :-
dif(S, exit(0)),
dif(S, exit(128)),
- !,
send(@display, report, error,
'Files could not be saved.').
-commited(_) :-
+committed(exit(N)) :-
+ member(N, [0,128]),
send(@dialog, destroy).