dendron
dendron copied to clipboard
note preview only update when editor obtains focus
I thought editing a note with the preview pane opened would automatically update the rendering on the preview. This does not appear to happen anymore? You must make the editor lose and regain focus, and then the render updates. This is with v0.107.2.
Here is the log while typing in the editor:
info: {"ctx":"refreshBacklinksChangeActiveTextEditor"}
info: {"ctx":"WindowWatcher:onDidChangeActiveTextEditor","editor":"/Users/chris.townsend/Dendron/vault/samplenote.md"}
debug: {"ctx":"TextDocumentService:applyTextDocument","uri":"/Users/chris.townsend/Dendron/vault/samplenote.md"}
debug: {"ctx":"TextDocumentService:applyTextDocument","uri":"/Users/chris.townsend/Dendron/vault/samplenote.md","msg":"note content unchanged, returning original note"}
info: {"ctx":"updateDecorations","payload":{"error":null,"decorationsLength":2,"diagnosticsLength":0}}
debug: {"ctx":"WindowWatcher:onDidChangeTextEditorVisibleRanges","editor":"/Users/chris.townsend/Dendron/vault/samplenote.md"}
info: {"ctx":"updateDecorations","payload":{"error":null,"decorationsLength":2,"diagnosticsLength":0}}
debug: {"ctx":"WindowWatcher:onDidChangeTextEditorVisibleRanges","editor":"/Users/chris.townsend/Dendron/vault/samplenote.md"}
info: {"ctx":"provideCompletionItems","position":{"line":10,"character":5},"msg":"enter"}
info: {"ctx":"updateDecorations","payload":{"error":null,"decorationsLength":2,"diagnosticsLength":0}}
debug: {"ctx":"WindowWatcher:onDidChangeTextEditorVisibleRanges","editor":"/Users/chris.townsend/Dendron/vault/samplenote.md"}
info: {"ctx":"updateDecorations","payload":{"error":null,"decorationsLength":2,"diagnosticsLength":0}}
debug: {"ctx":"WindowWatcher:onDidChangeTextEditorVisibleRanges","editor":"/Users/chris.townsend/Dendron/vault/samplenote.md"}
info: {"ctx":"provideCompletionItems","position":{"line":10,"character":7},"msg":"enter"}
info: {"ctx":"updateDecorations","payload":{"error":null,"decorationsLength":2,"diagnosticsLength":0}}
And here is the log when I click down to the output window and then back into the note. This action updates the render.
info: {"ctx":"refreshBacklinksChangeActiveTextEditor"}
info: {"ctx":"WorkspaceWatcher:onWillSaveTextDocument","url":"/Users/chris.townsend/Dendron/vault/samplenote.md","reason":"FocusOut","msg":"enter"}
info: {"ctx":"WorkspaceWatcher:onWillSaveNote","match":["updated: 1660323150631","1660323150631"],"msg":"update activeText editor"}
info: {"ctx":"refreshBacklinksEngineNoteStateChanged"}
debug: {"ctx":"TextDocumentService:onDidSave","uri":"/Users/chris.townsend/Dendron/vault/samplenote.md"}
debug: {"ctx":"TextDocumentService:updateNoteContents","fname":"samplenote","msg":"exit"}
info: {"ctx":"refreshBacklinksEngineNoteStateChanged"}
info: {"ctx":"refreshBacklinksChangeActiveTextEditor"}
info: {"ctx":"WindowWatcher:onDidChangeActiveTextEditor","editor":"/Users/chris.townsend/Dendron/vault/samplenote.md"}
debug: {"ctx":"TextDocumentService:applyTextDocument","uri":"/Users/chris.townsend/Dendron/vault/samplenote.md"}
debug: {"ctx":"TextDocumentService:applyTextDocument","uri":"/Users/chris.townsend/Dendron/vault/samplenote.md","msg":"note content unchanged, returning original note"}
info: {"ctx":"updateDecorations","payload":{"error":null,"decorationsLength":2,"diagnosticsLength":0}}
Thank you for the report.
This usually happens when there is some syntax error that the preview is unable to handle, but it doesn't seem to be the case from the logs you posted.
I can't reliably reproduce this on my end at the moment, but we'll investigate why this is happening and let you know when it gets resolved.