Closed ColinKennedy closed 8 months ago
To be honest it's trying to ignore same-line edits currently. Maybe I've missed some edge case, going to check. Thank you for a clear description!
You know I can't seem to reproduce it anymore. If it happens again I will let you know though!
Actually, now it might happen when you wrap around the history list, i.e. if the last and the first edits are in the same line. I will think how this could be solved, maybe deduplication logic can be improved further.
If you have a file like
And you edit
Then
Then
before.nvim
records 3 changes, because the last 2 changes are on the same line. It'd be nice to be able to customize that behavior so same-line jumps are ignored and it just goes to the next position that is on a different file or line. And in this mode, the cursor always jumps to the first non-whitespace character instead of the exact column.It'd probably be a good thing if these are 2 separately configurable options
{["cursor_behavior"] = "exact" | "start_nonwhitespace"}
{["skip_lines"] = "never" | "same_line_and_buffer"}
"never"
: don't skip any lines when doing jumps"same_line_and_buffer"
: Skip the next jump if it's in the same line and buffer as the previous jump