tweaks: move an 'if', to not call leftedge_for() when not softwrapping
parent
964771afc3
commit
e8e9b8ad82
|
@ -535,12 +535,9 @@ void redecorate_after_switch(void)
|
|||
|
||||
#ifndef NANO_TINY
|
||||
/* While in a different buffer, the screen may have been resized
|
||||
* or softwrap mode maybe have been toggled, so make sure that the
|
||||
* or softwrap mode may have been toggled, so make sure that the
|
||||
* starting column for the first row gets an appropriate value. */
|
||||
if (ISSET(SOFTWRAP))
|
||||
ensure_firstcolumn_is_aligned();
|
||||
else
|
||||
openfile->firstcolumn = 0;
|
||||
ensure_firstcolumn_is_aligned();
|
||||
#endif
|
||||
|
||||
/* Update title bar and multiline info to match the current buffer. */
|
||||
|
|
|
@ -3130,8 +3130,11 @@ size_t number_of_chunks_in(linestruct *line)
|
|||
* has changed, because then the width of softwrapped chunks has changed. */
|
||||
void ensure_firstcolumn_is_aligned(void)
|
||||
{
|
||||
openfile->firstcolumn = leftedge_for(openfile->firstcolumn,
|
||||
openfile->edittop);
|
||||
if (ISSET(SOFTWRAP))
|
||||
openfile->firstcolumn = leftedge_for(openfile->firstcolumn,
|
||||
openfile->edittop);
|
||||
else
|
||||
openfile->firstcolumn = 0;
|
||||
|
||||
/* If smooth scrolling is on, make sure the viewport doesn't center. */
|
||||
focusing = FALSE;
|
||||
|
|
Loading…
Reference in New Issue