Article View: gnu.emacs.bug
Article #99385Bug in split window
From: Paul Reilly
Date: Tue, 18 Sep 1990 16:40
Date: Tue, 18 Sep 1990 16:40
53 lines
1964 bytes
1964 bytes
------- Start of forwarded message -------
A user on our network reports the following problem with Emacs 18.55:
From: wood@gen-rtx (Tom Wood)
To: reilly (Paul Reilly)
Cc: brennan (David Brennan)
Subject: Bug in split-window
Date: Tue, 18 Sep 90 8:07:00 EDT
I tried running emacs with 161 columns so that C-x 5 will yield two windows
exactly 80 columns each. Curiously, this didn't happen. The function
Fsplit_window in src/window.c doesn't take into account the window
separator. In this case, equal vertical windows are created with C-u 81 C-x 5.
A simple fix would be to change the calculation of size:
if (NULL (chsize))
{
if (!NULL (horflag))
size = XFASTINT (o->width) >> 1;
else
size = XFASTINT (o->height) >> 1;
}
else
{
CHECK_NUMBER (chsize, 1);
size = XINT (chsize);
}
to
if (NULL (chsize))
{
if (!NULL (horflag))
size = (1 + XFASTINT (o->width)) >> 1;
else
size = XFASTINT (o->height) >> 1;
}
else
{
CHECK_NUMBER (chsize, 1);
size = XINT (chsize);
}
Note that C-x 2 works as documented.
------- End of forwarded message -------
Paul Reilly, Data General Corp. reilly@dg-rtp.dg.com
62 T.W. Alexander Drive ...mcnc!rti!dg-rtp!reilly
Research Triangle Park, North Carolina, 27709 (919) 248-6210
Technical Details
Message-ID:
<9009181640.AA02320@pita.rtp.dg.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!DG-RTP.DG.COM!reillyShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,61da5bc8089f087b,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1990-09-18 09:40:01 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!tut.cis.ohio-state.edu!DG-RTP.DG.COM!reilly From: reilly@DG-RTP.DG.COM (Paul Reilly) Newsgroups: gnu.emacs.bug Subject: Bug in split window Message-ID: <9009181640.AA02320@pita.rtp.dg.com> Date: 18 Sep 90 16:40:01 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 53 Posted: Tue Sep 18 17:40:01 1990