diff --git a/src/nano.c b/src/nano.c index caacafd8..15c55afc 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2637,9 +2637,10 @@ int main(int argc, char **argv) margin = needed_margin; editwincols = COLS - margin; +#ifndef NANO_TINY /* Ensure that firstcolumn is the starting column of its chunk. */ ensure_firstcolumn_is_aligned(); - +#endif /* The margin has changed -- schedule a full refresh. */ refresh_needed = TRUE; } diff --git a/src/proto.h b/src/proto.h index 484fdb5e..7ca63985 100644 --- a/src/proto.h +++ b/src/proto.h @@ -662,7 +662,9 @@ int go_back_chunks(int nrows, filestruct **line, size_t *leftedge); int go_forward_chunks(int nrows, filestruct **line, size_t *leftedge); bool less_than_a_screenful(size_t was_lineno, size_t was_leftedge); void edit_scroll(scroll_dir direction, int nrows); +#ifndef NANO_TINY void ensure_firstcolumn_is_aligned(void); +#endif void edit_redraw(filestruct *old_current); void edit_refresh(void); void adjust_viewport(update_type location); diff --git a/src/winio.c b/src/winio.c index 868686bd..fd5993c2 100644 --- a/src/winio.c +++ b/src/winio.c @@ -2951,19 +2951,19 @@ void edit_scroll(scroll_dir direction, int nrows) } } +#ifndef NANO_TINY /* Ensure that firstcolumn is at the starting column of the softwrapped chunk * it's on. We need to do this when the number of columns of the edit window * has changed, because then the width of softwrapped chunks has changed. */ void ensure_firstcolumn_is_aligned(void) { -#ifndef NANO_TINY if (openfile->firstcolumn % editwincols != 0) openfile->firstcolumn -= (openfile->firstcolumn % editwincols); /* If smooth scrolling is on, make sure the viewport doesn't center. */ focusing = FALSE; -#endif } +#endif /* Return TRUE if current[current_x] is above the top of the screen, and FALSE * otherwise. */