nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 39e5b527344b511452d5070477b0d29ad43ca512
parent 70b347183b0bd0ffc7e02151bb5a0fc665299789
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 26 Jun 2019 10:12:23 +0200

tweaks: call the correct lighting function directly when softwrapping

Diffstat:
Msrc/winio.c | 11+++--------
1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/src/winio.c b/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);