Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
c92b9be6
Commit
c92b9be6
authored
8 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: rename three variables, to be more fitting
parent
eef7d104
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/search.c
+2
-2
src/search.c
src/winio.c
+12
-10
src/winio.c
with
14 additions
and
12 deletions
+14
-12
src/search.c
View file @
c92b9be6
...
...
@@ -1203,10 +1203,10 @@ void update_history(filestruct **h, const char *s)
/* If the history is full, delete the oldest item (the one at the
* head of the list), to make room for a new item at the end. */
if
((
*
hbot
)
->
lineno
==
MAX_SEARCH_HISTORY
+
1
)
{
filestruct
*
foo
=
*
hage
;
filestruct
*
oldest
=
*
hage
;
*
hage
=
(
*
hage
)
->
next
;
unlink_node
(
foo
);
unlink_node
(
oldest
);
renumber
(
*
hage
);
}
...
...
This diff is collapsed.
Click to expand it.
src/winio.c
View file @
c92b9be6
...
...
@@ -2967,8 +2967,8 @@ void edit_redraw(filestruct *old_current)
* if we've moved and changed text. */
void
edit_refresh
(
void
)
{
filestruct
*
foo
;
int
nlines
;
filestruct
*
line
;
int
row
=
0
;
/* Figure out what maxrows should really be. */
compute_maxrows
();
...
...
@@ -2983,20 +2983,22 @@ void edit_refresh(void)
adjust_viewport
((
focusing
||
!
ISSET
(
SMOOTH_SCROLL
))
?
CENTERING
:
STATIONARY
);
}
foo
=
openfile
->
edittop
;
#ifdef DEBUG
fprintf
(
stderr
,
"edit-refresh: now edittop = %ld
\n
"
,
(
long
)
openfile
->
edittop
->
lineno
);
#endif
for
(
nlines
=
0
;
nlines
<
editwinrows
&&
foo
!=
NULL
;
nlines
++
)
{
nlines
+=
update_line
(
foo
,
(
foo
==
openfile
->
current
)
?
openfile
->
current_x
:
0
);
foo
=
foo
->
next
;
line
=
openfile
->
edittop
;
while
(
row
<
editwinrows
&&
line
!=
NULL
)
{
if
(
line
==
openfile
->
current
)
row
+=
update_line
(
line
,
openfile
->
current_x
)
+
1
;
else
row
+=
update_line
(
line
,
0
)
+
1
;
line
=
line
->
next
;
}
for
(;
nlines
<
editwinrows
;
nlines
++
)
blank_line
(
edit
,
nlines
,
0
,
COLS
);
while
(
row
<
editwinrows
)
blank_line
(
edit
,
row
++
,
0
,
COLS
);
reset_cursor
();
wnoutrefresh
(
edit
);
...
...
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
Menu
Projects
Groups
Snippets
Help