well as single-line ones. This avoids a segfault when trying
to color e.g. "start="$" end="$"". (DLR, found by Trevor
Caira)
+ edit_redraw()
+ - Fix problem where not all lines would be updated properly if
+ we'd scrolled off the screen and the mark was on. (DLR)
do_credits()
- Update the last copyright notice to include 2006. (DLR)
- configure.ac:
{
bool do_redraw = need_vertical_update(0) ||
need_vertical_update(old_pww);
- const filestruct *foo;
+ const filestruct *foo = NULL;
/* If either old_current or current is offscreen, scroll the edit
* window until it's onscreen and get out. */
filestruct *old_edittop = openfile->edittop;
ssize_t nlines;
+#ifndef NANO_TINY
+ /* If the mark is on, update all the lines between old_current
+ * and the old last line of the edit window. */
+ if (openfile->mark_set) {
+ ssize_t old_last_lineno = (old_edittop->lineno +
+ editwinrows <= openfile->filebot->lineno) ?
+ old_edittop->lineno + editwinrows :
+ openfile->filebot->lineno;
+
+ foo = old_current;
+
+ while (foo->lineno != old_last_lineno) {
+ update_line(foo, 0);
+
+ foo = (foo->lineno > old_last_lineno) ? foo->prev :
+ foo->next;
+ }
+ }
+#endif /* !NANO_TINY */
+
/* Put edittop in range of current, get the difference in lines
* between the original edittop and the current edittop, and
* then restore the original edittop. */
else
edit_scroll(DOWN, nlines);
+#ifndef NANO_TINY
+ /* If the mark is on, update all the lines between the old last
+ * line of the edit window and current. */
+ if (openfile->mark_set) {
+ while (foo != openfile->current) {
+ update_line(foo, 0);
+
+ foo = (foo->lineno > openfile->current->lineno) ?
+ foo->prev : foo->next;
+ }
+ }
+#endif /* !NANO_TINY */
+
return;
}