add comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2251 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
8a31afdc55
commit
0c9df578ea
15
src/winio.c
15
src/winio.c
|
@ -3076,9 +3076,18 @@ void edit_add(const filestruct *fileptr, const char *converted, int
|
||||||
goto step_two;
|
goto step_two;
|
||||||
|
|
||||||
/* Now paint the start of fileptr. */
|
/* Now paint the start of fileptr. */
|
||||||
paintlen = (end_line != fileptr) ? -1 :
|
if (end_line != fileptr)
|
||||||
actual_x(converted, strnlenpt(fileptr->data,
|
/* If the start of fileptr is on a different line
|
||||||
endmatch.rm_eo) - start);
|
* from the end, paintlen is -1, meaning that
|
||||||
|
* everything on the line gets painted. */
|
||||||
|
paintlen = -1;
|
||||||
|
else
|
||||||
|
/* Otherwise, paintlen is the expanded location of
|
||||||
|
* the end of the match minus the expanded location
|
||||||
|
* of the beginning of the page. */
|
||||||
|
paintlen = actual_x(converted,
|
||||||
|
strnlenpt(fileptr->data, endmatch.rm_eo) -
|
||||||
|
start);
|
||||||
|
|
||||||
mvwaddnstr(edit, yval, 0, converted, paintlen);
|
mvwaddnstr(edit, yval, 0, converted, paintlen);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue