diff --git a/src/move.c b/src/move.c index d19e9b2c..c758ec89 100644 --- a/src/move.c +++ b/src/move.c @@ -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 {