Skip to content

Vim removes last newline #488

@LLyaudet

Description

@LLyaudet

Hi,

I have found the following bug. When I open a file in Vim the last newline disappears.
Hence it is impossible to see it is there and to remove it (suppress or backspace doesn't work).
The problem occurs both with Linux '\n' and Windows '\r\n'.

I join a sample text file with a '\r\n'
testVim3.txt
Another sample text file with a '\n'
testVim5.txt

The problem is quite serious for php files
testVim.txt
since additional characters after "?>" are sent as HTML and you can get an error "Headers already sent" if you want to output something else that HTML.

I had to compare the result in Nano, Notepad++ and hexdump to realize the problem was with Vim.

Best regards,
Laurent Lyaudet

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions