Preserve the cursor’s offset when moving to a shorter line

As an example of what this changes, consider the following file, where the block represents the cursor’s current position:

```
     a long line█
     short
Old: anoth█er long line
New: another lon█g line
```

Moving the cursor down twice used to place the cursor five characters (the length of `short`) along the line. Now, it preserves the original offset from the first line, which is the behaviour present in most editors. Furthermore, moving to the end of a line with a keyboard command (Ctrl-E) will place the cursor at the end of all lines even after switching to a longer one.