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
92992c7e
Commit
92992c7e
authored
Sep 19, 1994
by
Karl Heuer
Browse files
(vmotion, Fvertical_motion): Fix Lisp_Object vs. int problems.
parent
16a3738c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
19 deletions
+21
-19
src/indent.c
src/indent.c
+21
-19
No files found.
src/indent.c
View file @
92992c7e
...
...
@@ -748,7 +748,7 @@ vmotion (from, vtarget, width, hscroll, window)
struct
position
pos
;
/* vpos is cumulative vertical position, changed as from is changed */
register
int
vpos
=
0
;
register
in
t
prevline
;
Lisp_Objec
t
prevline
;
register
int
first
;
int
lmargin
=
hscroll
>
0
?
1
-
hscroll
:
0
;
int
selective
...
...
@@ -768,20 +768,22 @@ vmotion (from, vtarget, width, hscroll, window)
to determine hpos of starting point */
if
(
from
>
BEGV
&&
FETCH_CHAR
(
from
-
1
)
!=
'\n'
)
{
prevline
=
find_next_newline_no_quit
(
from
,
-
1
);
while
(
prevline
>
BEGV
XFASTINT
(
prevline
)
=
find_next_newline_no_quit
(
from
,
-
1
);
while
(
XFASTINT
(
prevline
)
>
BEGV
&&
((
selective
>
0
&&
indented_beyond_p
(
prevline
,
selective
))
&&
indented_beyond_p
(
XFASTINT
(
prevline
)
,
selective
))
#ifdef USE_TEXT_PROPERTIES
/* watch out for newlines with `invisible' property */
||
!
NILP
(
Fget_char_property
(
XFASTINT
(
prevline
)
,
||
!
NILP
(
Fget_char_property
(
prevline
,
Qinvisible
,
window
))
#endif
))
prevline
=
find_next_newline_no_quit
(
prevline
-
1
,
-
1
);
pos
=
*
compute_motion
(
prevline
,
0
,
lmargin
+
(
prevline
==
1
?
start_hpos
:
0
),
XFASTINT
(
prevline
)
=
find_next_newline_no_quit
(
XFASTINT
(
prevline
)
-
1
,
-
1
);
pos
=
*
compute_motion
(
XFASTINT
(
prevline
),
0
,
lmargin
+
(
XFASTINT
(
prevline
)
==
1
?
start_hpos
:
0
),
from
,
1
<<
(
INTBITS
-
2
),
0
,
width
,
hscroll
,
0
,
XWINDOW
(
window
));
}
...
...
@@ -803,29 +805,29 @@ vmotion (from, vtarget, width, hscroll, window)
while
((
vpos
>
vtarget
||
first
)
&&
from
>
BEGV
)
{
prevline
=
from
;
XFASTINT
(
prevline
)
=
from
;
while
(
1
)
{
prevline
=
find_next_newline_no_quit
(
prevline
-
1
,
-
1
);
if
(
prevline
==
BEGV
XFASTINT
(
prevline
)
=
find_next_newline_no_quit
(
XFASTINT
(
prevline
)
-
1
,
-
1
);
if
(
XFASTINT
(
prevline
)
==
BEGV
||
((
selective
<=
0
||
!
indented_beyond_p
(
prevline
,
selective
))
||
!
indented_beyond_p
(
XFASTINT
(
prevline
)
,
selective
))
#ifdef USE_TEXT_PROPERTIES
/* watch out for newlines with `invisible' property */
&&
NILP
(
Fget_char_property
(
XFASTINT
(
prevline
),
Qinvisible
,
window
))
&&
NILP
(
Fget_char_property
(
prevline
,
Qinvisible
,
window
))
#endif
))
break
;
}
pos
=
*
compute_motion
(
prevline
,
0
,
lmargin
+
(
prevline
==
1
?
start_hpos
:
0
),
pos
=
*
compute_motion
(
XFASTINT
(
prevline
),
0
,
lmargin
+
(
XFASTINT
(
prevline
)
==
1
?
start_hpos
:
0
),
from
,
1
<<
(
INTBITS
-
2
),
0
,
width
,
hscroll
,
0
,
XWINDOW
(
window
));
vpos
-=
pos
.
vpos
;
first
=
0
;
from
=
prevline
;
from
=
XFASTINT
(
prevline
)
;
}
/* If we made exactly the desired vertical distance,
...
...
@@ -869,7 +871,7 @@ if beginning or end of buffer was reached.")
if
(
!
NILP
(
window
))
CHECK_WINDOW
(
window
,
0
);
else
XSET
(
window
,
Lisp_Window
,
selected_window
)
;
window
=
selected_window
;
w
=
XWINDOW
(
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