tweaks: elide an unneeded variable
After a line break, the preceding line is readily available through the 'prev' element.master
parent
286c877853
commit
5316f5078f
|
@ -1434,7 +1434,6 @@ bool do_wrap(void)
|
||||||
/* The length of the remainder. */
|
/* The length of the remainder. */
|
||||||
|
|
||||||
size_t old_x = openfile->current_x;
|
size_t old_x = openfile->current_x;
|
||||||
linestruct *old_line = openfile->current;
|
|
||||||
|
|
||||||
/* There are three steps. First, we decide where to wrap. Then, we
|
/* There are three steps. First, we decide where to wrap. Then, we
|
||||||
* create the new wrap line. Finally, we clean up. */
|
* create the new wrap line. Finally, we clean up. */
|
||||||
|
@ -1537,8 +1536,8 @@ bool do_wrap(void)
|
||||||
do_enter();
|
do_enter();
|
||||||
|
|
||||||
if (old_x < wrap_loc) {
|
if (old_x < wrap_loc) {
|
||||||
|
openfile->current = openfile->current->prev;
|
||||||
openfile->current_x = old_x;
|
openfile->current_x = old_x;
|
||||||
openfile->current = old_line;
|
|
||||||
prepend_wrap = TRUE;
|
prepend_wrap = TRUE;
|
||||||
} else {
|
} else {
|
||||||
openfile->current_x += (old_x - wrap_loc);
|
openfile->current_x += (old_x - wrap_loc);
|
||||||
|
|
Loading…
Reference in New Issue