{"action":"created","issue":{"url":"https://api.github.com/repos/justbur/emacs-which-key/issues/19","labels_url":"https://api.github.com/repos/justbur/emacs-which-key/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/justbur/emacs-which-key/issues/19/comments","events_url":"https://api.github.com/repos/justbur/emacs-which-key/issues/19/events","html_url":"https://github.com/justbur/emacs-which-key/issues/19","id":93717080,"number":19,"title":"BUG: which-key window not wide enough","user":{"login":"bmag","id":4334375,"avatar_url":"https://avatars.githubusercontent.com/u/4334375?v=3","gravatar_id":"","url":"https://api.github.com/users/bmag","html_url":"https://github.com/bmag","followers_url":"https://api.github.com/users/bmag/followers","following_url":"https://api.github.com/users/bmag/following{/other_user}","gists_url":"https://api.github.com/users/bmag/gists{/gist_id}","starred_url":"https://api.github.com/users/bmag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmag/subscriptions","organizations_url":"https://api.github.com/users/bmag/orgs","repos_url":"https://api.github.com/users/bmag/repos","events_url":"https://api.github.com/users/bmag/events{/privacy}","received_events_url":"https://api.github.com/users/bmag/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-07-08T07:20:42Z","updated_at":"2015-07-09T15:29:19Z","closed_at":"2015-07-08T15:42:04Z","body":"Using these settings:\r\n```elisp\r\n(setq which-key-popup-type 'side-window\r\n      which-key-side-window-location 'right\r\n      which-key-side-window-max-width 90)\r\n```\r\nResults in a which-key window that isn't wide enough for the lines in the which-key buffer. The \"empty\" lines contain spaces, and each such line is actually the continuation of the previous line (Spacemacs makes it look like two different lines, but in the buffer it's a single line).\r\n![which-key-not-wide-enough](https://cloud.githubusercontent.com/assets/4334375/8564647/bd8e5ab0-2556-11e5-9138-4bf2c3d41c8d.png)\r\n\r\nThis is the actual content of the which-key buffer. Notice the cursor is at the bottom left corner of the text:\r\n![which-key-actual-buffer](https://cloud.githubusercontent.com/assets/4334375/8564744/acc92c54-2557-11e5-96d2-14287dccf657.png)\r\n\r\nI will debug this later, but I suspect we may have a slight miscommunication about `which-key/show-popup` and `which-key/popup-max-dimensions`. As I understand it, the ACT-POPUP-DIM argument to `show-popup` specifies the width and the height of the popup window as follows:\r\n- width: the length of each line in which-key buffer, or the length of the longest line in which-key buffer. Length is the same as \"number of columns\". `show-popup` should take care of calculating necessary width to accommodate for fringes, margins, scroll bars, etc.\r\n- height: the number of lines in which-key buffer.\r\n\r\nAssuming all lines are of the same length, ACT-POPUP-DIM should be equivalent to:\r\n```elisp\r\n(with-current-buffer which-key-buffer-name\r\n  (save-excursion\r\n    (goto-char (point-max))\r\n    (cons (line-number-at-pos) (current-column))))\r\n```\r\n\r\nConcerning `popup-max-dimensions`, as I understand it, the function should return the maximal height and width that `show-popup` can handle. So the following should always be true:\r\n```elisp\r\n(and (<= (car argument-to-show-popup) (car popup-max-dimensions-return-value))\r\n     (<= (cdr argument-to-show-popup) (car popup-max-dimensions-return-value)))\r\n```\r\n\r\nPlease share what meaning you meant those parameters to have, so we can agree on a single meaning and fix this issue."},"comment":{"url":"https://api.github.com/repos/justbur/emacs-which-key/issues/comments/120034695","html_url":"https://github.com/justbur/emacs-which-key/issues/19#issuecomment-120034695","issue_url":"https://api.github.com/repos/justbur/emacs-which-key/issues/19","id":120034695,"user":{"login":"justbur","id":2208382,"avatar_url":"https://avatars.githubusercontent.com/u/2208382?v=3","gravatar_id":"","url":"https://api.github.com/users/justbur","html_url":"https://github.com/justbur","followers_url":"https://api.github.com/users/justbur/followers","following_url":"https://api.github.com/users/justbur/following{/other_user}","gists_url":"https://api.github.com/users/justbur/gists{/gist_id}","starred_url":"https://api.github.com/users/justbur/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justbur/subscriptions","organizations_url":"https://api.github.com/users/justbur/orgs","repos_url":"https://api.github.com/users/justbur/repos","events_url":"https://api.github.com/users/justbur/events{/privacy}","received_events_url":"https://api.github.com/users/justbur/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T15:29:19Z","updated_at":"2015-07-09T15:29:19Z","body":"Oh, I suppose the arrows could be wider. I just tested again setting `(setq which-key-separator \">\")` though and the width is still not correct for the side window in #23."}}