moving: improve retention of the target column somewhat

It's not yet good enough: when proper_x() pushes the index forward,
maybe it should also increase leftedge?  Or go_forward_chunks()?
master
Benno Schulenberg 2017-08-22 15:59:20 +02:00
parent 97896d30f1
commit 047cf9be9c
1 changed files with 3 additions and 1 deletions

View File

@ -52,8 +52,10 @@ void get_edge_and_target(size_t *leftedge, size_t *target_column)
{
#ifndef NANO_TINY
if (ISSET(SOFTWRAP)) {
size_t shim = editwincols * (1 + (tabsize / editwincols));
*leftedge = leftedge_for(xplustabs(), openfile->current);
*target_column = openfile->placewewant - *leftedge;
*target_column = (openfile->placewewant + shim - *leftedge) % editwincols;
} else
#endif
{