mirror of git://git.sv.gnu.org/nano.git
Adding some debugging code to track which multidata codes get assigned.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5246 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
e00b3e8587
commit
2e121fa08c
|
@ -1,3 +1,7 @@
|
||||||
|
2015-06-14 Benno Schulenberg <bensberg@justemail.net>
|
||||||
|
* src/winio.c (edit_draw): Add some debugging code to track which
|
||||||
|
multidata codes (for multiline regexes) get assigned to which lines.
|
||||||
|
|
||||||
2015-06-11 Benno Schulenberg <bensberg@justemail.net>
|
2015-06-11 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/winio.c (get_key_buffer): Add some debugging code to make it
|
* src/winio.c (get_key_buffer): Add some debugging code to make it
|
||||||
easy to see what codes a key stroke produces.
|
easy to see what codes a key stroke produces.
|
||||||
|
|
16
src/winio.c
16
src/winio.c
|
@ -2654,11 +2654,17 @@ void edit_draw(filestruct *fileptr, const char *converted, int
|
||||||
if (end_line != fileptr) {
|
if (end_line != fileptr) {
|
||||||
paintlen = -1;
|
paintlen = -1;
|
||||||
fileptr->multidata[tmpcolor->id] = CWHOLELINE;
|
fileptr->multidata[tmpcolor->id] = CWHOLELINE;
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, " Marking for id %i line %i as CWHOLELINE\n", tmpcolor->id, line);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
paintlen = actual_x(converted,
|
paintlen = actual_x(converted,
|
||||||
strnlenpt(fileptr->data,
|
strnlenpt(fileptr->data,
|
||||||
endmatch.rm_eo) - start);
|
endmatch.rm_eo) - start);
|
||||||
fileptr->multidata[tmpcolor->id] = CBEGINBEFORE;
|
fileptr->multidata[tmpcolor->id] = CBEGINBEFORE;
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, " Marking for id %i line %i as CBEGINBEFORE\n", tmpcolor->id, line);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
mvwaddnstr(edit, line, 0, converted, paintlen);
|
mvwaddnstr(edit, line, 0, converted, paintlen);
|
||||||
step_two:
|
step_two:
|
||||||
|
@ -2705,9 +2711,12 @@ void edit_draw(filestruct *fileptr, const char *converted, int
|
||||||
|
|
||||||
mvwaddnstr(edit, line, x_start,
|
mvwaddnstr(edit, line, x_start,
|
||||||
converted + index, paintlen);
|
converted + index, paintlen);
|
||||||
if (paintlen > 0)
|
if (paintlen > 0) {
|
||||||
fileptr->multidata[tmpcolor->id] = CSTARTENDHERE;
|
fileptr->multidata[tmpcolor->id] = CSTARTENDHERE;
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, " Marking for id %i line %i as CSTARTENDHERE\n", tmpcolor->id, line);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* There is no end on this line. But we
|
/* There is no end on this line. But we
|
||||||
|
@ -2728,6 +2737,9 @@ void edit_draw(filestruct *fileptr, const char *converted, int
|
||||||
/* We painted to the end of the line, so
|
/* We painted to the end of the line, so
|
||||||
* don't bother checking any more
|
* don't bother checking any more
|
||||||
* starts. */
|
* starts. */
|
||||||
|
#ifdef DEBUG
|
||||||
|
fprintf(stderr, " Marking for id %i line %i as CENDAFTER\n", tmpcolor->id, line);
|
||||||
|
#endif
|
||||||
fileptr->multidata[tmpcolor->id] = CENDAFTER;
|
fileptr->multidata[tmpcolor->id] = CENDAFTER;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue