Commit 047cf9be authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

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()?
parent 97896d30
Showing with 3 additions and 1 deletion
+3 -1
......@@ -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
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment