diff --git a/src/nano.c b/src/nano.c index caacafd8f25a7c783027040c5be57bff19f4a9c3..15c55afcf54cf71896186033eefdb14eafbe2a35 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 484fdb5efa99476fa501de4fa952b629fc19a9db..7ca63985142557e10212b2078226703b3bf2d165 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 868686bdd1bae4d2c036fda18a82b3e6db5cec8a..fd5993c23fc1971a47aa72ae6ad34ccc96f1331e 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. */