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
9856e218
Commit
9856e218
authored
Apr 14, 1997
by
Richard M. Stallman
Browse files
(adjust_markers): Don't be confused by the gap
when computing the arg to record_marker_adjustment.
parent
a326c090
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
src/insdel.c
src/insdel.c
+18
-2
No files found.
src/insdel.c
View file @
9856e218
...
@@ -274,8 +274,24 @@ adjust_markers (from, to, amount)
...
@@ -274,8 +274,24 @@ adjust_markers (from, to, amount)
but then this range contains no markers. */
but then this range contains no markers. */
if
(
mpos
>
from
+
amount
&&
mpos
<=
from
)
if
(
mpos
>
from
+
amount
&&
mpos
<=
from
)
{
{
record_marker_adjustment
(
marker
,
from
+
amount
-
mpos
);
int
before
=
mpos
;
mpos
=
from
+
amount
;
int
after
=
from
+
amount
;
mpos
=
after
;
/* Compute the before and after positions
as buffer positions. */
if
(
before
>
GPT
+
GAP_SIZE
)
before
-=
GAP_SIZE
;
else
if
(
before
>
GPT
)
before
=
GPT
;
if
(
after
>
GPT
+
GAP_SIZE
)
after
-=
GAP_SIZE
;
else
if
(
after
>
GPT
)
after
=
GPT
;
record_marker_adjustment
(
marker
,
after
-
before
);
}
}
}
}
if
(
mpos
>
from
&&
mpos
<=
to
)
if
(
mpos
>
from
&&
mpos
<=
to
)
...
...
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