pajoma / vscode-journal

Lightweight journal and simple notes support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=pajoma.vscode-journal
GNU General Public License v3.0
233 stars 40 forks source link

Memo feature discards input sometimes #59

Closed banjerluke closed 3 years ago

banjerluke commented 4 years ago

First, I'm so thrilled to have found your extension! I've been dreaming about something like this for a long time. Plain text rules. 😊

Unfortunately, I soon discovered that the Ctrl+Shift+J type-to-add-a-memo feature doesn't always work. There's a random chance that it will discard what I type and do nothing. For example, in this GIF it only was successful on attempts 3, 4, and 6 (of 7 total):

memo adding bug screengrab

I am using a custom memo template (timestamped as I plan to use it for interstitial journaling):

"journal.tpl-memo": "${d:HHmm} ${input}",
"journal.tpl-memo-after": "## Process",

Closing and reopening VS Code didn't help. Neither did disabling auto-save. It doesn't seem to matter whether the file being added to was previously open or not. Nothing shows up in the logs. I only have a few other extensions enabled: Remote SSH, Settings Sync, Sublime Text Keymap, and a few language-support extensions.

Let me know if there's anything else you'd like me to test!

pajoma commented 4 years ago

I will look into it. I already have a new version ready, which I am testing right now.

pajoma commented 4 years ago

Ok, this is a bit stupid. In my parsing rules I decided that a memo string has to be longer then 6 characters, in your example you see that everything below is ignored.

I check if I can remove this rule without interfering with other functions

pajoma commented 4 years ago

I have added the current prerelease to this project, can you please download it from here and test it?

To test, use the option "Install from VSIX..." in the Extension View of Visual Studio Code.

banjerluke commented 4 years ago

Works great! Thank you!