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
e4cef308
Commit
e4cef308
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: drop an assert, add a warning, and change a 'for' to a 'while'
parent
9936a635
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/nano.c
+6
-4
src/nano.c
with
6 additions
and
4 deletions
+6
-4
src/nano.c
View file @
e4cef308
...
...
@@ -179,15 +179,17 @@ void renumber(filestruct *line)
{
ssize_t
number
;
if
(
line
==
NULL
)
if
(
line
==
NULL
)
{
statusline
(
ALERT
,
"Trying to renumber nothing -- please report a bug"
);
return
;
}
number
=
(
line
->
prev
==
NULL
)
?
0
:
line
->
prev
->
lineno
;
assert
(
line
!=
line
->
next
);
for
(;
line
!=
NULL
;
line
=
line
->
next
)
while
(
line
!=
NULL
)
{
line
->
lineno
=
++
number
;
line
=
line
->
next
;
}
}
/* Partition the current buffer so that it appears to begin at (top, top_x)
...
...
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