Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: edit-command-line: disable `monitor' option locally



On Mar 16,  9:16pm, Frank Terbeck wrote:
} Subject: PATCH: edit-command-line: disable `monitor' option locally
}
} I was just told, that suspending an editor while using
} `edit-command-line' will cause the command line to be lost, yielding
} this:
} 
} edit-command-line:zle:17: widgets can only be called when ZLE is active
} 
} Which makes sense.

Hmm.  I don't have this problem.  If I suspend from edit-command-line I
get brought back to the prompt and the previous input is all still there.
I can resume the editor with "fg" (at which point vim gives me an error
about the file no longer existing); if I write, exit, and then repeat
the edit-command-line keystroke, I'm back in the editor looking at the
stuff I wrote out a minute before, and if I now exit again that stuff
is loaded onto the command line.
 
} So, in order to shield users from accidential dataloss, this patch
} unsets the `monitor' option temporarily. That does the trick for me and
} I don't think there is anything this would break.

On the other hand if I put in this patch, then when I try to resume the
backgrounded editor I end up in a *very* strange state where the shell
is not responding to anything, and I have to go off to another window
and kill -CONT the editor before I can proceed.  In that case vim dies
almost immediately with "Vim: Error reading input, exiting..."
 
} If I'm missing something, yell.

I think perhaps this behaves very differently in different contexts.
Restartable system calls may be the difference, I don't know which
platform has the trouble that you described.



Messages sorted by: Reverse Date, Date, Thread, Author