moving: adjust the Y position to correspond with the changed X position
So the softwrap code in do_down() can compute the correct amount to scroll. This fixes https://savannah.gnu.org/bugs/?49374.master
parent
8476bf86a1
commit
d66ea08473
|
@ -582,8 +582,13 @@ void do_right(void)
|
|||
if (openfile->current->data[openfile->current_x] != '\0')
|
||||
openfile->current_x = move_mbright(openfile->current->data,
|
||||
openfile->current_x);
|
||||
else if (openfile->current != openfile->filebot)
|
||||
else if (openfile->current != openfile->filebot) {
|
||||
openfile->current_x = 0;
|
||||
#ifndef NANO_TINY
|
||||
if (ISSET(SOFTWRAP))
|
||||
openfile->current_y -= strlenpt(openfile->current->data) / COLS;
|
||||
#endif
|
||||
}
|
||||
|
||||
openfile->placewewant = xplustabs();
|
||||
|
||||
|
|
Loading…
Reference in New Issue