mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 14:20:46 +03:00
tweaks: frob two fragments of code, to be more readable
This commit is contained in:
parent
055e262b56
commit
6cbb7bc443
12
src/winio.c
12
src/winio.c
@ -2490,7 +2490,7 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col)
|
||||
for (; varnish != NULL; varnish = varnish->next) {
|
||||
size_t index = 0;
|
||||
/* Where in the line we currently begin looking for a match. */
|
||||
int start_col;
|
||||
int start_col = 0;
|
||||
/* The starting column of a piece to paint. Zero-based. */
|
||||
int paintlen = 0;
|
||||
/* The number of characters to paint. */
|
||||
@ -2532,9 +2532,8 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col)
|
||||
if (match.rm_so >= till_x)
|
||||
break;
|
||||
|
||||
start_col = (match.rm_so <= from_x) ?
|
||||
0 : wideness(line->data,
|
||||
match.rm_so) - from_col;
|
||||
if (match.rm_so > from_x)
|
||||
start_col = wideness(line->data, match.rm_so) - from_col;
|
||||
|
||||
thetext = converted + actual_x(converted, start_col);
|
||||
|
||||
@ -2662,9 +2661,8 @@ void draw_row(int row, const char *converted, linestruct *line, size_t from_col)
|
||||
startmatch.rm_so += index;
|
||||
startmatch.rm_eo += index;
|
||||
|
||||
start_col = (startmatch.rm_so <= from_x) ?
|
||||
0 : wideness(line->data,
|
||||
startmatch.rm_so) - from_col;
|
||||
if (startmatch.rm_so > from_x)
|
||||
start_col = wideness(line->data, startmatch.rm_so) - from_col;
|
||||
|
||||
thetext = converted + actual_x(converted, start_col);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user