K1000-O
K1000-O

Reputation: 11

VS Code erases the final part of my file without me notticing

When i'm coding through VSCode, sometimes the last part of my file either deletes or introduce red NULL characters. It's important because i can be in any place of the file, compile and suddenly I lost some lines...

I've being looking on Google but no one had this same error...

Example:

Before:

    print(qsel_nr(t, 0))
    print(qsel_nr(t, 1))
    print(qsel_nr(t, 2))
    print(qsel_nr(t, 7))
    print(qsel_nr(t, 8))
    print(qsel_nr(t, 9))

After:

    print(qsel_nr(t, 0))
    print(qsel_nr(t, 1))
    print(qsel_nr(t, 2))
    print(qsel_nr(t, 7))
    print(qse             <- deleted like this.

I've tried:

But nothing happends.

Upvotes: 1

Views: 85

Answers (1)

user19973965
user19973965

Reputation:

As someone suggested, the hard drive may have bad sectors.

If you use Windows, try storing the file on OneDrive and see, if the problem persists.

Alternatively you can try using a different text editor or IDE. VS Code has recently had many bugs including syntax highlighting breaking for me in Python, so try using PyCharm and see if the problem persists. If it does not, create an issue on vscode GitHub.

Upvotes: 1

Related Questions