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
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
7250968e
Commit
7250968e
authored
Aug 09, 1994
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fwindow_end): If window_end_valid is nil, return nil.
parent
c638661f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
src/window.c
src/window.c
+17
-1
No files found.
src/window.c
View file @
7250968e
...
...
@@ -493,7 +493,16 @@ DEFUN ("window-end", Fwindow_end, Swindow_end, 0, 1, 0,
"Return position at which display currently ends in WINDOW.
\n
\
This is updated by redisplay, when it runs to completion.
\n
\
Simply changing the buffer text or setting `window-start'
\n
\
does not update this value."
)
does not update this value.
\n
\
\n
\
This function returns nil if the position is not currently known.
\n
\
That happens when redisplay is preempted and doesn't finish.
\n
\
If in that case you want to compute where the end of the window would
\n
\
have been if redisplay had finished, do this:
\n
\
(save-excursion
\n
\
(goto-char (window-start window))
\n
\
(vertical-motion (1- (window-height window)) window)
\n
\
(point))"
)
(
window
)
Lisp_Object
window
;
{
...
...
@@ -504,6 +513,13 @@ does not update this value.")
buf
=
w
->
buffer
;
CHECK_BUFFER
(
buf
,
0
);
/* If we don't know the end position, return nil.
The user can compute it with vertical-motion if he wants to.
It would be nicer to do it automatically,
but that's so slow that it would probably bother people. */
if
(
NILP
(
w
->
window_end_valid
))
return
Qnil
;
XSET
(
value
,
Lisp_Int
,
BUF_Z
(
XBUFFER
(
buf
))
-
XFASTINT
(
w
->
window_end_pos
));
...
...
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