Closed norberturkiewicz closed 5 years ago
Dyalog APL/W-64 Version 16.0.34994
Serial No : 003280
Unicode Edition
Thu Feb 21 21:57:56 2019
zz←'⎕se'⎕wg'Editor'
zz.onFix
⎕SE.SALTUtils.EditorFix
zz.onAfterFix
⎕SE.SALTUtils.EditorFix
f00←{1}
zz.onFix←'#.f00'
)ed qwerty
⍝ create new function and escape
⎕cr'qwerty'
qwerty←{
whatever
}
f00←{0}
)ed qwerty
⍝ changed but editor won't close
⍝ switch to session
f00←{1}
⍝ back to editor and escape
⎕cr'qwerty'
qwerty←{
⍝ 1 did this while f00 was {0}
whatever
}
So although I'm not sure exactly what you're trying to do, if you return zero on line exit:
the editor will (or at least it should) stay open.
I'm checking if my projects git branch is on "master" before allowing acre to update the file on disk. If the branch is on the master, I want to confirm that this is a valid operation. This goes with the workflow that a user should never work directly on master but we have no warning when branches are switched outside of apl.
If the branch is on master and the user says 'NO', the operation should be canceled and the edit window kept open.
For precisely that reason I use my own user command ]OpenMyProject which gives me information like branch, Status etc.
If you don't switch branches while working in APL (you shouldn't really) then that should suffice.
See Issue #152
@PhilLast I have a personal branch of acre where I do git branch state checking. If I answer 'NO' to the question I'd like to keep the edit window open. Can you advise where I need to make that change?
My two enhancements