2 added 135 characters in body
source | link

I think this is the solution for your problem

Can't open a new tab or new file on scratch

To fix this issue:

  1. Make sure you don't have any unsaved files in Scratch when run as root (with the sudo command). This fix will delete those files.

  2. Open Terminal and use root permissions to remove the directory.

    sudo rm -rf ~/.local/share/scratch-text-editor

  3. Open Scratch as your own user (do not use the sudo command)


Scratch is the old name of Code

With Code the command should be: sudo rm -rf ~/.local/share/io.elementary.code

I think this is the solution for your problem

Can't open a new tab or new file on scratch

To fix this issue:

  1. Make sure you don't have any unsaved files in Scratch when run as root (with the sudo command). This fix will delete those files.

  2. Open Terminal and use root permissions to remove the directory.

    sudo rm -rf ~/.local/share/scratch-text-editor

  3. Open Scratch as your own user (do not use the sudo command)

I think this is the solution for your problem

Can't open a new tab or new file on scratch

To fix this issue:

  1. Make sure you don't have any unsaved files in Scratch when run as root (with the sudo command). This fix will delete those files.

  2. Open Terminal and use root permissions to remove the directory.

    sudo rm -rf ~/.local/share/scratch-text-editor

  3. Open Scratch as your own user (do not use the sudo command)


Scratch is the old name of Code

With Code the command should be: sudo rm -rf ~/.local/share/io.elementary.code

1
source | link

I think this is the solution for your problem

Can't open a new tab or new file on scratch

To fix this issue:

  1. Make sure you don't have any unsaved files in Scratch when run as root (with the sudo command). This fix will delete those files.

  2. Open Terminal and use root permissions to remove the directory.

    sudo rm -rf ~/.local/share/scratch-text-editor

  3. Open Scratch as your own user (do not use the sudo command)