Skip to content

[BUG] In a multi-line CSV file, a row disappear when a line break occurs. #75

Open

Description

@EngYOSHI

Thank you for this project.

While editing a cell, when I insert a line break using Shift + Enter, the row I had been entering disappears.
After it disappears, I am able to insert a line break in that row, but the same issue occurs in subsequent rows as well—on the first line break attempt, the row always disappears.

I have included a reproduction video below.
https://github.com/user-attachments/assets/3608323d-7f61-4621-b8f3-9700e5da5c14

Thank you in advance.

Activity

  1. EngYOSHI commented on Feb 11, 2026

    @EngYOSHI
    Author

    Additional information:
    This issue occurs not only when pressing Shift + Enter, but also when saving the file (Ctrl + S or via File → Save).

    For example: type “aaaa”, press Shift + Enter to insert a new line, type “bbbb”, then press Ctrl + S. As a result, “bbbb” disappears.

  2. jonaraphael commented on Mar 1, 2026

    @jonaraphael
    Owner

    Thanks so much for opening this issue and for the clear report.
    I will reproduce this first, then implement the smallest safe fix, add/update tests, and share a PR for your review.

  3. jonaraphael commented on Mar 1, 2026

    @jonaraphael
    Owner

    Implemented in #77 for review: https://github.com/jonaraphael/csv/pull/77\n\nThis update ensures Ctrl/Cmd+S commits the active cell edit before save is sent, which addresses the multiline-loss path you reported.

  4. EngYOSHI commented on Mar 25, 2026

    @EngYOSHI
    Author

    Thank you for your response, and I apologize for the delayed reply.
    I tried running the updated version in VSCode, but unfortunately the issue has not been resolved.
    After inserting a line break with Shift + Enter, the problem still occurs on the next Shift + Enter, when selecting another cell, or when saving with Ctrl + S.

  5. JeppeKlitgaard commented on Jul 26, 2026

    @JeppeKlitgaard

    I am having problems with the CSV ending up with non-full lines as well, which I believe may be due to this bug, or perhaps is an unrelated bug.

    It is fairly easy to produce invalid CSV files in the editor from which it is not easy to recover. Adding new rows following a multiline cell appears to be a reliable reproducer. Notice how row 4 (D) is mangled below:

    Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions