CLI xi --wait does not exit when the XiEditor app is killed using CMD+Q
XiEditor posts "io.xi-editor.XiEditor.FileClosed" notification on windowShouldClose(_ sender:) which is invoked whenever window is closed. But this delegate is not
invoked when the app is killed using CMD+Q
Fix:
NSDocument invokes close() on both app termination and window close so, instead of windowShouldClose(_ sender:) rely on NSDocument's close() method to post "io.xi-editor.XiEditor.FileClosed" notification
Now Xi CLI should stop waiting both on closing a window and on app exit(CMD+Q)
Related Issues
closes #460
Checklist
Example:
[ ] Example check-list item
[x] Create a pull request template
[ ] make xi perfect
Review Checklist
[ ] I have responded to reviews and made changes where appropriate.
[ ] I have tested the code
[ ] I have updated comments / documentation related to the changes I made.
[ ] I have rebased my PR branch onto xi-mac/master.
Summary Issue: https://github.com/xi-editor/xi-mac/issues/460 xi --wait does not return after application exit
CLI xi --wait does not exit when the XiEditor app is killed using CMD+Q
XiEditor posts "io.xi-editor.XiEditor.FileClosed" notification on windowShouldClose(_ sender:) which is invoked whenever window is closed. But this delegate is not invoked when the app is killed using CMD+Q
Fix: NSDocument invokes close() on both app termination and window close so, instead of windowShouldClose(_ sender:) rely on NSDocument's close() method to post "io.xi-editor.XiEditor.FileClosed" notification
Now Xi CLI should stop waiting both on closing a window and on app exit(CMD+Q)
Related Issues
closes #460
Checklist
Example:
Review Checklist