Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
45450dd5
Commit
45450dd5
authored
Dec 01, 2000
by
Miles Bader
Browse files
(fit-window-to-buffer): Handle non-nil `truncate-lines'.
parent
a584be02
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
lisp/ChangeLog
lisp/ChangeLog
+4
-0
lisp/window.el
lisp/window.el
+11
-3
No files found.
lisp/ChangeLog
View file @
45450dd5
2000-12-01 Miles Bader <miles@gnu.org>
* window.el (fit-window-to-buffer): Handle non-nil `truncate-lines'.
2000-12-01 Kenichi Handa <handa@etl.go.jp>
* international/mule-diag.el (describe-char-after): Fix typo.
...
...
lisp/window.el
View file @
45450dd5
...
...
@@ -508,9 +508,17 @@ header-line."
(
let
((
end
(
with-current-buffer
buf
(
save-excursion
(
goto-char
(
point-max
))
(
if
(
and
(
bolp
)
(
not
(
bobp
)))
(
1-
(
point
))
(
point
))))))
(
when
(
and
(
bolp
)
(
not
(
bobp
)))
;; Don't include final newline
(
backward-char
1
))
(
when
truncate-lines
;; If line-wrapping is turned off, test the
;; beginning of the last line for visibility
;; instead of the end, as the end of the line
;; could be invisible by virtue of extending past
;; the edge of the window.
(
forward-line
0
))
(
point
)))))
(
set-window-vscroll
window
0
)
(
while
(
and
(
<
desired-height
max-height
)
(
=
desired-height
(
window-height
window
))
...
...
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