ex_docmd.c: :edit is a no-op in terminal buffers #2822

Closes #2779
This commit is contained in:
Felipe Morales
2015-06-02 21:55:33 -03:00
committed by Justin M. Keyes
parent 8992f8b1c7
commit 34fdb11e53

View File

@@ -6565,11 +6565,13 @@ do_exedit (
(void)do_ecmd(0, NULL, NULL, eap, ECMD_ONE, (void)do_ecmd(0, NULL, NULL, eap, ECMD_ONE,
ECMD_HIDE + (eap->forceit ? ECMD_FORCEIT : 0), ECMD_HIDE + (eap->forceit ? ECMD_FORCEIT : 0),
old_curwin == NULL ? curwin : NULL); old_curwin == NULL ? curwin : NULL);
} else if ((eap->cmdidx != CMD_split } else if ((eap->cmdidx != CMD_split && eap->cmdidx != CMD_vsplit)
&& eap->cmdidx != CMD_vsplit || *eap->arg != NUL) {
) // ":edit <blank>" is a no-op in terminal buffers. #2822
|| *eap->arg != NUL if (curbuf->terminal != NULL && eap->cmdidx == CMD_edit && *eap->arg == NUL) {
) { return;
}
/* Can't edit another file when "curbuf_lock" is set. Only ":edit" /* Can't edit another file when "curbuf_lock" is set. Only ":edit"
* can bring us here, others are stopped earlier. */ * can bring us here, others are stopped earlier. */
if (*eap->arg != NUL && curbuf_locked()) if (*eap->arg != NUL && curbuf_locked())