New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange contents of `keyboard-shortcuts.md` #278

Open
borekb opened this Issue Mar 29, 2017 · 2 comments

Comments

Projects
None yet
3 participants
@borekb

borekb commented Mar 29, 2017

I use Caret on two computers, with keyboard-shortcuts.md synchronized via OneDrive + symlinks. When leaving my work laptop, the contents of keyboard-shortcuts.md was fine but when I opened Caret on a home PC, the content was written as this:

# Keyboard Shortcuts

## File

```yaml
File › New: Ctrl N
File › Open...: Ctrl O
File › Save: Ctrl S
File › Save As...: Ctrl Shift S
File › Reveal in Explorer: none
File › Autosave: none
File › Export to PDF...: none
File › Export to HTML...: none
File › Preferences: Ctrl ,
File › Keyboard Shortcuts: none

that's it so the file was clearly corrupt. I've removed keyboard-shortcuts.md locally and restarted Caret, went to keyboard shortcuts again to recreate everything from scratch and to my surprise, there was my old full but slightly corrupted file:

image

The rest of the file seems fine.

Is it possible that some caching is coming into play? Caret 2.0.5.

@borekb

This comment has been minimized.

Show comment
Hide comment
@borekb

borekb Apr 5, 2017

It just happened again.

Did some more research and it was really strange, like if the malformed keyboard-shortcuts.md was cached or something. I kept doing this:

  1. Close Caret
  2. Put fresh and correct keyboard-shortcuts.md in place
  3. Start Caret
  4. File > Keyboard Shortcuts

I would see the file on the disk to be rewritten to the malformed variant time and time again.

Then I left Caret open while manually replacing the keyboard-shortcuts.md file with the correct one, it picked it up and is correct since then. Strange because my local copy of keyboard-shortcuts.md didn't change at all.

borekb commented Apr 5, 2017

It just happened again.

Did some more research and it was really strange, like if the malformed keyboard-shortcuts.md was cached or something. I kept doing this:

  1. Close Caret
  2. Put fresh and correct keyboard-shortcuts.md in place
  3. Start Caret
  4. File > Keyboard Shortcuts

I would see the file on the disk to be rewritten to the malformed variant time and time again.

Then I left Caret open while manually replacing the keyboard-shortcuts.md file with the correct one, it picked it up and is correct since then. Strange because my local copy of keyboard-shortcuts.md didn't change at all.

@zachpetersen

This comment has been minimized.

Show comment
Hide comment
@zachpetersen

zachpetersen Apr 25, 2017

I've been seeing some possibly related caching "issues" wherein I've updated a file outside of Caret and when I open Caret the file opens automatically and does not reflect the changes.

If I open a different file and then reopen the previously modified file the changes are reflected. This suggests that Caret is holding onto a cached version of documents even upon reopening the application.

zachpetersen commented Apr 25, 2017

I've been seeing some possibly related caching "issues" wherein I've updated a file outside of Caret and when I open Caret the file opens automatically and does not reflect the changes.

If I open a different file and then reopen the previously modified file the changes are reflected. This suggests that Caret is holding onto a cached version of documents even upon reopening the application.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment