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
62056764
Commit
62056764
authored
May 14, 1993
by
Jim Blandy
Browse files
* intervals.c (set_point): Check for point out of bounds before
checking for an empty interval tree.
parent
517b2e01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
src/intervals.c
src/intervals.c
+6
-4
No files found.
src/intervals.c
View file @
62056764
...
...
@@ -1254,16 +1254,18 @@ set_point (position, buffer)
if
(
position
==
buffer
->
text
.
pt
)
return
;
/* Check this now, before checking if the buffer has any intervals.
That way, we can catch conditions which break this sanity check
whether or not there are intervals in the buffer. */
if
(
position
>
BUF_Z
(
buffer
)
||
position
<
BUF_BEG
(
buffer
))
abort
();
if
(
NULL_INTERVAL_P
(
buffer
->
intervals
))
{
buffer
->
text
.
pt
=
position
;
return
;
}
/* Perhaps we should just change `position' to the limit. */
if
(
position
>
BUF_Z
(
buffer
)
||
position
<
BUF_BEG
(
buffer
))
abort
();
/* Position Z is really one past the last char in the buffer. */
if
(
position
==
BUF_ZV
(
buffer
))
iposition
=
position
-
1
;
...
...
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