"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/winio.c" between
nano-5.6.tar.xz and nano-5.6.1.tar.xz

About: Nano is ANOther display-oriented text editor (an enhanced free clone of Pico from the Pine project).

winio.c  (nano-5.6.tar.xz):winio.c  (nano-5.6.1.tar.xz)
skipping to change at line 3507 skipping to change at line 3507
to_col = right_edge; to_col = right_edge;
/* If the target text is of zero length, highlight a space instead. */ /* If the target text is of zero length, highlight a space instead. */
if (to_col == from_col) { if (to_col == from_col) {
word = copy_of(" "); word = copy_of(" ");
to_col++; to_col++;
} else } else
word = display_string(openfile->current->data, from_col, word = display_string(openfile->current->data, from_col,
to_col - from_col , FALSE, overshoots); to_col - from_col , FALSE, overshoots);
wattron(edit, interface_color_pair[HIGHLIGHTED]); wattron(edit, interface_color_pair[SPOTLIGHTED]);
waddnstr(edit, word, actual_x(word, to_col)); waddnstr(edit, word, actual_x(word, to_col));
if (overshoots) if (overshoots)
mvwaddch(edit, openfile->current_y, COLS - 1 - thebar, '>'); mvwaddch(edit, openfile->current_y, COLS - 1 - thebar, '>');
wattroff(edit, interface_color_pair[HIGHLIGHTED]); wattroff(edit, interface_color_pair[SPOTLIGHTED]);
free(word); free(word);
} }
#ifndef NANO_TINY #ifndef NANO_TINY
/* Highlight the text between the given two columns on the current line. */ /* Highlight the text between the given two columns on the current line. */
void spotlight_softwrapped(size_t from_col, size_t to_col) void spotlight_softwrapped(size_t from_col, size_t to_col)
{ {
ssize_t row; ssize_t row;
size_t leftedge = leftedge_for(from_col, openfile->current); size_t leftedge = leftedge_for(from_col, openfile->current);
skipping to change at line 3547 skipping to change at line 3547
} }
/* If the target text is of zero length, highlight a space instea d. */ /* If the target text is of zero length, highlight a space instea d. */
if (break_col == from_col) { if (break_col == from_col) {
word = copy_of(" "); word = copy_of(" ");
break_col++; break_col++;
} else } else
word = display_string(openfile->current->data, from_col, word = display_string(openfile->current->data, from_col,
b reak_col - from_col, FALSE, FALSE); b reak_col - from_col, FALSE, FALSE);
wattron(edit, interface_color_pair[SELECTED_TEXT]); wattron(edit, interface_color_pair[SPOTLIGHTED]);
waddnstr(edit, word, actual_x(word, break_col)); waddnstr(edit, word, actual_x(word, break_col));
wattroff(edit, interface_color_pair[SELECTED_TEXT]); wattroff(edit, interface_color_pair[SPOTLIGHTED]);
free(word); free(word);
if (end_of_line) if (end_of_line)
break; break;
wmove(edit, ++row, margin); wmove(edit, ++row, margin);
leftedge = break_col; leftedge = break_col;
from_col = break_col; from_col = break_col;
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)