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
c67c4312
Commit
c67c4312
authored
8 years ago
by
David Lawrence Ramsey
Committed by
Benno Schulenberg
8 years ago
Browse files
Options
Download
Email Patches
Plain Diff
tweaks: improve comments and formatting in update_line()
parent
bf0268d4
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/winio.c
+7
-3
src/winio.c
with
7 additions
and
3 deletions
+7
-3
src/winio.c
View file @
c67c4312
...
...
@@ -2655,9 +2655,11 @@ void edit_draw(filestruct *fileptr, const char *converted,
#endif
/* !NANO_TINY */
}
/* Redraw one line from the edit buffer. The line will be displayed starting
* with fileptr->data[index]. Likely values of index are current_x or zero.
* Return the number of additional rows consumed (needed for SOFTWRAP). */
/* Redraw the line at fileptr. The line will be displayed so that the
* character with the given index is visible -- if necessary, the line
* will be horizontally scrolled. In softwrap mode, however, the entire
* line will be displayed. Likely values of index are current_x or zero.
* Return the number of additional rows consumed (when softwrapping). */
int
update_line
(
filestruct
*
fileptr
,
size_t
index
)
{
int
row
=
0
;
...
...
@@ -2720,6 +2722,7 @@ int update_line(filestruct *fileptr, size_t index)
#ifdef DEBUG
fprintf
(
stderr
,
"update_line(): softwrap code, moving to %d column %lu
\n
"
,
row
,
(
unsigned
long
)
from_col
);
#endif
/* First, blank out the row. */
blank_row
(
edit
,
row
,
0
,
COLS
);
/* Expand the line, replacing tabs with spaces, and control
...
...
@@ -2737,6 +2740,7 @@ int update_line(filestruct *fileptr, size_t index)
}
}
#endif
/* !NANO_TINY */
return
extra_rows
;
}
...
...
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