mirror of git://git.sv.gnu.org/nano.git
tweaks: call the correct lighting function directly when softwrapping
This commit is contained in:
parent
70b347183b
commit
39e5b52734
11
src/winio.c
11
src/winio.c
|
@ -2889,7 +2889,7 @@ int update_softwrapped_line(linestruct *fileptr)
|
|||
}
|
||||
|
||||
if (spotlighted && !inhelp)
|
||||
spotlight(light_from_col, light_to_col);
|
||||
spotlight_softwrapped(light_from_col, light_to_col);
|
||||
|
||||
return (row - starting_row);
|
||||
}
|
||||
|
@ -3456,13 +3456,6 @@ void spotlight(size_t from_col, size_t to_col)
|
|||
|
||||
place_the_cursor();
|
||||
|
||||
#ifndef NANO_TINY
|
||||
if (ISSET(SOFTWRAP)) {
|
||||
spotlight_softwrapped(from_col, to_col);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
right_edge = get_page_start(from_col) + editwincols;
|
||||
|
||||
/* Limit the end column to the edge of the screen. */
|
||||
|
@ -3504,6 +3497,8 @@ void spotlight_softwrapped(size_t from_col, size_t to_col)
|
|||
bool end_of_line = FALSE;
|
||||
char *word;
|
||||
|
||||
place_the_cursor();
|
||||
|
||||
while (row < editwinrows) {
|
||||
break_col = get_softwrap_breakpoint(openfile->current->data,
|
||||
leftedge, &end_of_line);
|
||||
|
|
Loading…
Reference in New Issue