[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

[BUGFIX] Window split when renaming a session [PATCH]




The attached patch fixes a bug that messes up the w3m display when
renaming a session. The bug may have been introduced by one of
my prior patches that has not yet been merged. If so, it's probably the
one in which I combined code blocks of sessions/tab pop-up windows.

DESCRIPTION AND REPEATABILITY
=============================

1] Raise a emacs-w3m buffer.

2] M-x `w3m-session-select' to open the session pop-up window.

3] Advance point to a session you are willing to rename.

4] 'r' to perform the rename.

5] Notice that the window that had the session pop-up buffer is replaced
   with a copy of the emacs-w3m buffer, so you now have two main
   emacs-w3m windows instead of the single one with which you started.

What should have happened is that the session list buffer should have
remained in place so that you could continue to perform other actions
there, or decide to gracefully exit and return to the same window
configuration that you had prior to step two.

-- 
hkp://keys.gnupg.net
CA45 09B5 5351 7C11 A9D1  7286 0036 9E45 1595 8BC0
Index: ChangeLog
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/ChangeLog,v
retrieving revision 1.3670
diff -b -u -p -r1.3670 ChangeLog
--- ChangeLog	18 May 2018 07:59:06 -0000	1.3670
+++ ChangeLog	7 Jun 2018 05:54:51 -0000
@@ -1,1 +1,6 @@
+2018-06-07  Boruch Baum  <boruch_baum@xxxxxxx>
+
+	* w3m.el (w3m--setup-popup-window): Do not attempt to create new winow
+	for sessions renaming.
+
 2018-05-18  Katsumi Yamaoka  <yamaoka@xxxxxxx>

 	* w3m-proc.el (w3m-process-stop): Don't move point ([emacs-w3m:12976]).
Index: w3m.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m.el,v
retrieving revision 1.1711
diff -b -u -p -r1.1711 w3m.el
--- w3m.el	17 May 2018 04:21:01 -0000	1.1711
+++ w3m.el	7 Jun 2018 05:54:52 -0000
@@ -11044,8 +11066,8 @@ beside the main window."
 	    (not w3m-select-buffer-horizontal-window))
       (when (get-buffer-window buffer-name)
 	(delete-windows-on buffer-name)))
-    (unless (or (eq major-mode 'w3m-mode)
-		(eq major-mode 'w3m-select-buffer-mode))
+    (unless (memq major-mode
+              '(w3m-mode w3m-select-buffer-mode w3m-session-select-mode))
       (let ((buffer (w3m-alive-p t)))
 	(if buffer
 	    (w3m-popup-buffer buffer)