CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

🐞 Saving a file does not save pasted content

Open foss- opened this issue 2 years ago • 8 comments

Description

All text is lost when saving as Plain Text File.

To Reproduce

  1. open new CodeEdit window
  2. type some text
  3. save as Plain Text File

The file is saved but is empty - no text is found. The given file name is used and the file created at the selected location.

Expected behavior

Data should not be lost on save and a Plain Text File should be created with all the text that was there prior to saving.

Version information

CodeEdit: 1.0 (0) macOS: 13.1

Additional context

No response

foss- avatar Jan 06 '23 14:01 foss-

@foss- this appears to be happening with other filetypes as well. This feels like a pretty serious regression...

ben-p-commits avatar Jan 06 '23 22:01 ben-p-commits

I'm not able to replicate this...

matthijseikelenboom avatar Jan 14 '23 15:01 matthijseikelenboom

@matthijseikelenboom Maybe share the steps you are taking when attempting to reproduce. Still reproduce here with 0.0.1 (15).

foss- avatar Jan 14 '23 17:01 foss-

I'm not able to replicate this either. Step To Reproduce:

  1. Open CodeEdit
  2. Create a new file at Welcome Window
  3. Type some text
  4. Save as Plain Text File (.txt)

Tested on CodeEdit 0.0.1-alpha.15

Qubik65536 avatar Jan 14 '23 23:01 Qubik65536

Confirming above steps work now.

I am still able to reproduce the issue however with:

  1. open new file
  2. click into first line
  3. paste any text
  4. save as plain text file

Empty file is stored.

foss- avatar Jan 14 '23 23:01 foss-

I can replicate the problem with the new steps. But it seems that anything pasted into the editor won't be saved, the same problem for existing files, and it happens to all file formats.

To Reproduce:

  1. Open a file (By directly opening it or when having the folder opened)
  2. Paste anything anywhere
  3. Save by File -> Save or by Command + S

Edit: All contents could be saved after a keyboard interaction.

Qubik65536 avatar Jan 14 '23 23:01 Qubik65536

This seems to be related to copy/paste/undo/redo behavior. Try to undo your paste and you'll see it won't work. So it looks like it doesn't really gets pasted in the document in the first place.

matthijseikelenboom avatar Jan 15 '23 00:01 matthijseikelenboom

That is fascinating....

ben-p-commits avatar Jan 18 '23 17:01 ben-p-commits

Not sure what change resolved this problem, but it is gone in Version 0.0.3-alpha (32). Closing.

foss- avatar Apr 05 '23 08:04 foss-