Use `window-total-width' instead of `window-width'.
authorJoost Kremers <joostkremers@fastmail.fm>
Fri, 4 Apr 2014 12:10:22 +0000 (14:10 +0200)
committerTassilo Horn <tsdh@gnu.org>
Fri, 4 Apr 2014 12:10:22 +0000 (14:10 +0200)
* textmodes/reftex-toc.el (reftex-toc, reftex-re-enlarge): Use
`window-total-width' instead of `window-width'.

lisp/ChangeLog
lisp/textmodes/reftex-toc.el

index 6c457ba..e428019 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-04  Joost Kremers  <joostkremers@fastmail.fm>  (tiny change)
+
+       * textmodes/reftex-toc.el (reftex-toc, reftex-re-enlarge): Use
+       `window-total-width' instead of `window-width'.
+
 2014-04-03  Daniel Colascione  <dancol@dancol.org>
 
        * subr.el (set-transient-map): Remove rms's workaround entirely;
index a35c2e1..e164770 100644 (file)
@@ -241,13 +241,13 @@ When called with a raw C-u prefix, rescan the document first."
                 (< (window-height) (* 2 window-min-height)))
         (delete-other-windows))
 
-      (setq reftex-last-window-width (window-width)
+      (setq reftex-last-window-width (window-total-width)
             reftex-last-window-height (window-height))  ; remember
 
       (unless unsplittable
         (if reftex-toc-split-windows-horizontally
             (split-window-right
-             (floor (* (window-width)
+             (floor (* (window-total-width)
                        reftex-toc-split-windows-fraction)))
           (split-window-below
            (floor (* (window-height)
@@ -374,8 +374,8 @@ SPC=view TAB=goto RET=goto+hide [q]uit [r]escan [l]abels [f]ollow [x]r [?]Help
 (defun reftex-re-enlarge ()
   "Enlarge window to a remembered size."
   (let ((count (if reftex-toc-split-windows-horizontally
-                  (- (or reftex-last-window-width (window-width))
-                     (window-width))
+                  (- (or reftex-last-window-width (window-total-width))
+                     (window-total-width))
                 (- (or reftex-last-window-height (window-height))
                    (window-height)))))
     (when (> count 0)