toolstack / Folio

A beautiful markdown note-taking app for GNOME (forked from Paper)
GNU General Public License v3.0
182 stars 22 forks source link

New note contains garbage text #207

Open vanillajonathan opened 1 week ago

vanillajonathan commented 1 week ago

When I create a new note it creates a new empty file but the FolioEditView widget shows it as if it contains some garbage characters; it shows "QF;x".

Version: Folio 24.13 (Flatpak)

toolstack commented 1 week ago

I have seen this before but haven't yet been able to reproduce it consistently.

vanillajonathan commented 1 week ago

With GTK Inspector I can see that the GtkMarkdownBuffer have a property named text defined at GtkTextBuffer of type gchararray and the value of the property contains that garbage.

Maybe this is some kind of pointer to uninitialized memory? Maybe because the property current_buffer is nullable and haven't been initialized?

toolstack commented 1 week ago

I don't think so, I actually think it has to do with the code that ensures there is a blank line at the end of a markdown file.

Can you try creating a txt file instead of a md and see if you still see the garbage?

vanillajonathan commented 1 week ago

Today it seems to work fine and I cannot reproduce this issue.

toolstack commented 1 week ago

Ok, I'll leave this open for tracking purposes.

If you can get it to reproduce and try the text file creation, let me know.