Closed davidbrochart closed 6 years ago
Hi @davidbrochart, That should be fixed here: https://github.com/jonathanslenders/python-prompt-toolkit/commit/8cb130d03b986ca4ed68905823279bd8e8b16458 Could you try again please? Thanks!
The last line is a special case, I'm not considering yet. This is because prompt_toolkit considers the final line ending at the very end of the file, the start of yet another line. So, in a sense, it doesn't enforce files to have a line ending at the end. This is coming from the way prompts are working, maybe at some point I'll fix that for pyvim.
Works like a charm, thanks!
One small change, this is the final commit, because another unit test was broken. This should do it: https://github.com/jonathanslenders/python-prompt-toolkit/commit/a54fc0bd7579b11e290ccd4d70037d68c92f7be3
Launch pyvim and enter the following lines (line 2 is empty):
On line 1,
Shift-v
thenj
thend
, this deletes only line 1.u
to undo. On line 2,Shift-v
thend
, this deletes line 1 and 2. Also generally, on the last line of a file,Shift-v
thend
doesn't remove the line, it just clears it.This was there before prompt-toolkit 2.0.