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

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

bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces


From: Aaron Jensen
Subject: bug#45748: 28.0.50; fit-frame-to-buffer ignores leading spaces
Date: Sat, 9 Jan 2021 09:43:27 -0600

>From emacs -Q:

Create a buffer with only the following text and no trailing newline
(note the leading space):

 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

M-x fit-frame-to-buffer

The frame will be resized to the width of the X's, not including the
leading space, causing the line to wrap.

If the leading space is removed, it works as expected.

Any number of leading spaces are ignored, as are trailing spaces.

This has practical applications with company-posframe, which uses
sometimes one line child windows to show completion options and has
leading and trailing spaces around each completion.

In GNU Emacs 28.0.50 (build 1, x86_64-apple-darwin19.6.0, NS
appkit-1894.60 Version 10.15.7 (Build 19H114))
 of 2021-01-08 built on aaron-sub.local
Repository revision: d1c5e7afb1ad9890d925e8c1a5392b701a754dd5
Repository branch: master
Windowing system distributor 'Apple', version 10.3.1894
System Description:  Mac OS X 10.15.7


Aaron





reply via email to

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