Skip to content

ace-window.el (aw-make-frame): Fix height using cdr of aw-frame-size#255

Open
skalawag wants to merge 1 commit into
abo-abo:masterfrom
skalawag:fix/aw-make-frame-height
Open

ace-window.el (aw-make-frame): Fix height using cdr of aw-frame-size#255
skalawag wants to merge 1 commit into
abo-abo:masterfrom
skalawag:fix/aw-make-frame-height

Conversation

@skalawag

Copy link
Copy Markdown

The height parameter was incorrectly using (car aw-frame-size), the
width component, instead of (cdr aw-frame-size). This caused any
explicit height value to be silently ignored, with the width value
used in its place.

Also correct the aw-frame-size docstring: the units are characters
and text lines (as documented by make-frame), not pixels.

Reproduction:

#+begin_src emacs-lisp
;; Set a frame size where width and height are visibly different.
(setq aw-frame-size '(120 . 40))
#+end_src

Then, with at least two windows visible, invoke ace-window and press
z (or whichever character aw-make-frame-char is bound to). A new
frame will appear. Inspect its dimensions:

#+begin_src emacs-lisp
(cons (frame-width) (frame-height)) ; run in the new frame
#+end_src

Expected: (120 . 40) --- width 120 columns, height 40 lines.

Actual: (120 . 120) --- both dimensions are the width value because
(car aw-frame-size) (120) is used for height instead of
(cdr aw-frame-size) (40).

  The height parameter was incorrectly using (car aw-frame-size), the
  width component, instead of (cdr aw-frame-size).  This caused any
  explicit height value to be silently ignored, with the width value
  used in its place.

  Also correct the aw-frame-size docstring: the units are characters
  and text lines (as documented by make-frame), not pixels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant