tweaks: revert commit c88a2fd9 -- the extra variable is needed

This variable will be modified by go_forward_chunks(), but the value
of openfile->current itself should be maintained.
master
Benno Schulenberg 2018-03-23 11:31:08 +01:00
parent eff2e0e291
commit 206d89b739
1 changed files with 2 additions and 1 deletions

View File

@ -840,10 +840,11 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
#ifndef NANO_TINY #ifndef NANO_TINY
if (ISSET(SOFTWRAP)) { if (ISSET(SOFTWRAP)) {
filestruct *currentline = openfile->current;
size_t leftedge = leftedge_for(xplustabs(), openfile->current); size_t leftedge = leftedge_for(xplustabs(), openfile->current);
rows_from_tail = (editwinrows / 2) - go_forward_chunks( rows_from_tail = (editwinrows / 2) - go_forward_chunks(
editwinrows / 2, &openfile->current, &leftedge); editwinrows / 2, &currentline, &leftedge);
} else } else
#endif #endif
rows_from_tail = openfile->filebot->lineno - rows_from_tail = openfile->filebot->lineno -