From fab2e906baee1924e34d9006dfb7998eb3b40d5f Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 8 Aug 1995 21:18:36 +0000 Subject: [PATCH] (vc-revert-buffer): In a dedicated solitary window, make the frame invisible instead of trying to delete window. --- lisp/vc.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/vc.el b/lisp/vc.el index af950518703..fa38ca4f0d5 100644 --- a/lisp/vc.el +++ b/lisp/vc.el @@ -1372,11 +1372,17 @@ the file on the branch you are editing." (if (and changed (or vc-suppress-confirm (not (yes-or-no-p "Discard changes? ")))) (progn - (delete-window) + (if (and (window-dedicated-p (selected-window)) + (one-window-p t 'selected-frame)) + (make-frame-invisible (selected-frame)) + (delete-window)) (error "Revert cancelled")) (set-buffer obuf)) (if changed - (delete-window)) + (if (and (window-dedicated-p (selected-window)) + (one-window-p t 'selected-frame)) + (make-frame-invisible (selected-frame)) + (delete-window))) (vc-backend-revert file) (vc-resynch-window file t t) ) -- 2.39.2