Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1942f68f
Commit
1942f68f
authored
Oct 20, 1994
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fdisplay_buffer): If the other window is smaller
than its peer, even out their heights.
parent
8148baf9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
src/window.c
src/window.c
+20
-0
No files found.
src/window.c
View file @
1942f68f
...
...
@@ -1946,6 +1946,8 @@ Returns the window displaying BUFFER.")
window
=
Fsplit_window
(
window
,
Qnil
,
Qnil
);
else
{
Lisp_Object
upper
,
lower
,
other
;
window
=
Fget_lru_window
(
frames
);
/* If the LRU window is selected, and big enough,
and can be split, split it. */
...
...
@@ -1974,6 +1976,24 @@ Returns the window displaying BUFFER.")
if
(
NILP
(
window
))
window
=
Fframe_first_window
(
Fselected_frame
());
#endif
/* If window appears above or below another,
even out their heights. */
if
(
!
NILP
(
XWINDOW
(
window
)
->
prev
))
other
=
upper
=
XWINDOW
(
window
)
->
prev
,
lower
=
window
;
if
(
!
NILP
(
XWINDOW
(
window
)
->
next
))
other
=
lower
=
XWINDOW
(
window
)
->
next
,
upper
=
window
;
if
(
!
NILP
(
other
)
/* Check that OTHER and WINDOW are vertically arrayed. */
&&
XWINDOW
(
other
)
->
top
!=
XWINDOW
(
window
)
->
top
&&
XWINDOW
(
other
)
->
height
>
XWINDOW
(
window
)
->
height
)
{
int
total
=
XWINDOW
(
other
)
->
height
+
XWINDOW
(
window
)
->
height
;
struct
window
*
old_selected_window
=
selected_window
;
selected_window
=
XWINDOW
(
upper
);
change_window_height
(
total
/
2
-
XWINDOW
(
upper
)
->
height
,
0
);
selected_window
=
old_selected_window
;
}
}
}
else
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment