Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
78037831
Commit
78037831
authored
8 years ago
by
David Lawrence Ramsey
Committed by
Benno Schulenberg
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename a variable in edit_scroll(), to make sense
parent
83ff644b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/winio.c
+8
-8
src/winio.c
with
8 additions
and
8 deletions
+8
-8
src/winio.c
View file @
78037831
...
...
@@ -2781,7 +2781,7 @@ void compute_maxlines(void)
void
edit_scroll
(
scroll_dir
direction
,
ssize_t
nlines
)
{
ssize_t
i
;
filestruct
*
foo
;
filestruct
*
line
;
/* Part 1: nlines is the number of lines we're going to scroll the
* text of the edit window. */
...
...
@@ -2843,12 +2843,12 @@ void edit_scroll(scroll_dir direction, ssize_t nlines)
nlines
=
editwinrows
;
/* If we scrolled up, we're on the line before the scrolled region. */
foo
=
openfile
->
edittop
;
line
=
openfile
->
edittop
;
/* If we scrolled down, move down to the line before the scrolled region. */
if
(
direction
==
DOWNWARD
)
{
for
(
i
=
editwinrows
-
nlines
;
i
>
0
&&
foo
!=
NULL
;
i
--
)
foo
=
foo
->
next
;
for
(
i
=
editwinrows
-
nlines
;
i
>
0
&&
line
!=
NULL
;
i
--
)
line
=
line
->
next
;
}
/* Draw new lines on any blank lines before or inside the scrolled
...
...
@@ -2856,16 +2856,16 @@ void edit_scroll(scroll_dir direction, ssize_t nlines)
* scrolled up and we're on the bottom line, the line won't be
* blank, so we don't need to draw it unless the mark is on or we're
* not on the first page. */
for
(
i
=
nlines
;
i
>
0
&&
foo
!=
NULL
;
i
--
)
{
for
(
i
=
nlines
;
i
>
0
&&
line
!=
NULL
;
i
--
)
{
if
((
i
==
nlines
&&
direction
==
DOWNWARD
)
||
(
i
==
1
&&
direction
==
UPWARD
))
{
if
(
need_horizontal_scroll
(
openfile
->
placewewant
,
0
))
update_line
(
foo
,
(
foo
==
openfile
->
current
)
?
update_line
(
line
,
(
line
==
openfile
->
current
)
?
openfile
->
current_x
:
0
);
}
else
update_line
(
foo
,
(
foo
==
openfile
->
current
)
?
update_line
(
line
,
(
line
==
openfile
->
current
)
?
openfile
->
current_x
:
0
);
foo
=
foo
->
next
;
line
=
line
->
next
;
}
compute_maxlines
();
...
...
This diff is collapsed.
Click to expand it.
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