Subject: bug#18601: 24.3.94; set-fringe-mode with left fringe 0 breaks window width calculations on Mac OS

From: Constantine Vetoshev <[email-masked]>
Date: Thu, 2 Oct 2014 12:22:51 -0700

On Thu, Oct 2, 2014 at 11:44 AM, martin rudalics <[email-masked]> wrote:
> Did it work after #16470 was fixed?

Yes. There was no problem after #16470 was fixed. Nor was there a
problem in the last pretest, 24.3.93. The problem appeared after I
installed 24.3.94.

> Please post the results of `window--dump-frame' for both the (0 . 2) and
> the (1 . 2) fringes frame.  I suppose the frame has only one window.

Yes, there is only one window and one frame. Running with -Q.

After (set-fringe-mode '(0 . 2)), executing (window--dump-frame) puts
the following contents into *window-frame-dump*:

frame pixel: 600 x 494   cols/lines: 86 x 35   units: 7 x 14
frame text pixel: 574 x 490   cols/lines: 82 x 35
tool: 0  scroll: 15  fringe: 7  border: 2  right: 0  bottom: 0

#<window 3 on *scratch*>   parent: nil
pixel left: 0   top: 0   size: 596 x 476   new: 238
char left: 0   top: 0   size: 85 x 34   new: 17
normal: 1.0 x 1.0   new: 0.5
body pixel: 574 x 462   char: 82 x 33
width left fringe: 0  left margin: 0  right margin: 0
width right fringe: 7  scroll-bar: 15  divider: 0
height header-line: 0  mode-line: 14  divider: 0

#<window 4 on  *Minibuf-0*>   parent: nil
pixel left: 0   top: 476   size: 596 x 14   new: 0
char left: 0   top: 34   size: 596 x 1   new: 1
normal: 1.0 x 1.0   new: 0
body pixel: 574 x 14   char: 82 x 1
width left fringe: 0  left margin: 0  right margin: 0
width right fringe: 7  scroll-bar: 15  divider: 0
height header-line: 0  mode-line: 0  divider: 0

After (set-fringe-mode '(1 . 2)), executing (window--dump-frame) puts
the following contents into *window-frame-dump*:

frame pixel: 600 x 494   cols/lines: 86 x 35   units: 7 x 14
frame text pixel: 574 x 490   cols/lines: 82 x 35
tool: 0  scroll: 15  fringe: 7  border: 2  right: 0  bottom: 0

#<window 3 on *scratch*>   parent: nil
pixel left: 0   top: 0   size: 596 x 476   new: 238
char left: 0   top: 0   size: 85 x 34   new: 17
normal: 1.0 x 1.0   new: 0.5
body pixel: 574 x 462   char: 82 x 33
width left fringe: 3  left margin: 0  right margin: 0
width right fringe: 4  scroll-bar: 15  divider: 0
height header-line: 0  mode-line: 14  divider: 0

#<window 4 on  *Minibuf-0*>   parent: nil
pixel left: 0   top: 476   size: 596 x 14   new: 0
char left: 0   top: 34   size: 596 x 1   new: 1
normal: 1.0 x 1.0   new: 0
body pixel: 574 x 14   char: 82 x 1
width left fringe: 3  left margin: 0  right margin: 0
width right fringe: 4  scroll-bar: 15  divider: 0
height header-line: 0  mode-line: 0  divider: 0

I'm attaching two screenshots which show what happens.