bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#67715: 28.2; Minibuffer content is sometimes unexpectedly partially


From: Eli Zaretskii
Subject: bug#67715: 28.2; Minibuffer content is sometimes unexpectedly partially hidden
Date: Sat, 09 Dec 2023 19:02:33 +0200

> From: Markus Triska <triska@metalevel.at>
> Cc: 67715@debbugs.gnu.org
> Date: Sat, 09 Dec 2023 10:04:18 +0100
> 
> (let ((f (selected-frame)))
>   (with-selected-frame (make-frame)
>     (switch-to-buffer (get-buffer-create "other")))
>   (select-frame-set-input-focus f)
>   (let ((win (get-buffer-window "other" t)))
>     (when win
>       (with-selected-window win
>         (recenter 0)))
>     (let ((w (selected-window)))
>       (unwind-protect
>           (progn
>             (select-window (minibuffer-window))
>             (setq-local face-remapping-alist `((default :height 2.0)))
>             (fit-window-to-buffer)
>             (insert "hello")
>             (read-key))
>         (erase-buffer))
>       (select-window w))))

This seems to work:

(let ((f (selected-frame)))
  (with-selected-frame (make-frame)
    (switch-to-buffer (get-buffer-create "other")))
  (select-frame-set-input-focus f)
  (let ((win (get-buffer-window "other" t)))
    (when win
      (with-selected-window win
        (recenter 0)))
    (let ((w (selected-window)))
      (unwind-protect
          (progn
            (select-window (minibuffer-window))
            (fit-window-to-buffer)
            (read-key (propertize "hello" 'face '(:height 2.0))))
        (erase-buffer))
      (select-window w))))

As well as this (which is a minor variant of your original recipe);

    (let ((f (selected-frame)))
      (with-selected-frame (make-frame)
        (switch-to-buffer (get-buffer-create "other")))
      (select-frame-set-input-focus f)
      (let ((win (get-buffer-window "other" t)))
        (when win
          (with-selected-window win
            (recenter 0)))
        (with-selected-window (minibuffer-window)
          (unwind-protect
              (read-key (propertize "hello" 'face '(:height 2.0)))
            (erase-buffer)))))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]