github saberzero1/motions 0.64.0

latest releases: 1.4.0, 1.3.1, 1.3.0...
3 months ago

Fixed

  • Embedded table cell editor cursor shapes — cell editors in embedded table widget mode now display correct cursor shapes (block for normal, bar for insert) matching the user's configured cursorShapes settings. Previously, insert mode showed no cursor and normal mode showed a hollow block due to two issues: (1) cursorShapes was not passed to createEmbeddableEditor() in table-cell-editor.ts, and (2) the cell editor's CM6 instance does not receive .cm-focused from Obsidian, causing the fork's unfocused-cursor rule to apply. Fixed with a module-level setter (setCellEditorCursorShapes) wired in both onload() and reloadFeatures(), a pendingCursorShapes stash in embeddable-editor.ts to handle the super-before-assignment timing issue, and a dynamic CSSStyleSheet (via document.adoptedStyleSheets) that generates cursor CSS from the user's configured shapes. (#19)
    • Plugin: src/vim/table-cell-editor.ts (setter, dynamic stylesheet), src/editors/embeddable-editor.ts (pendingCursorShapes stash), src/main.ts (setter calls + cleanup)
  • Embedded table cell editor font size and line height mismatch — the cell editor text appeared larger than surrounding rendered table text in some themes, and cell height increased when entering edit mode. Added font-size: inherit, font-family: inherit, line-height: inherit to .vim-table-cell-editor .cm-editor, font-size: inherit to .cm-content, and padding: 0 + line-height: var(--table-line-height, var(--line-height-tight)) to .cm-line. (#19)
    • Plugin: styles.css (table cell editor CSS)
  • Table cell editor destroying wikilinks and formatting — editing a cell containing [[wikilink]], **bold**, or other markdown syntax stripped the syntax on write-back. Two issues: (1) the cell editor read its initial value from wrapper.textContent (the rendered DOM), which returns plain text without markdown syntax — [[note-a]] became note-a. Now reads raw markdown from the document source via getCellDocumentRange(). (2) On cell editor close, the cell content was restored as plain textContent without re-rendering markdown. Now uses MarkdownRenderer.render() to restore proper inline formatting (wikilinks, bold, italic, code) in the cell wrapper after the editor is destroyed. (#19)
    • Plugin: src/vim/table-cell-editor.ts (accepts rawMarkdown parameter, rerenderCellContent() on close), src/vim/table-nav-controller.ts (passes raw text from document)
  • Textarea vim overlay content not synced on rapid teardown — clicking "Save" via hint mode (f key) on a modal while a debounced content sync was pending could close the modal before the CM6 overlay flushed its content to the hidden <textarea>. The host plugin (e.g., Spaced Repetition) read the textarea's stale value and saved incomplete content. Root cause: teardownActive() cancelled the pending 100ms sync timer and destroyed the editor without flushing. The handleBlur() and handleEscapeAndRedispatch() paths already called syncNow() before teardown, but the MutationObserver path (modal removed from DOM) went straight to teardownActive(). Fixed by adding a syncNow() call in teardownActive() immediately after cancelling the timer but before destroying the editor. (#69)
    • Plugin: src/vim/textarea-vim-manager.ts (syncNow flush in teardownActive)

Documentation

  • CHANGELOG.md: Added entries for embedded table cell editor cursor shapes, font size/line height, wikilink color fixes, and textarea sync-on-teardown fix
  • KNOWN_LIMITATIONS.md: Added Live Preview rendering, cursor shapes, visual mode highlighting, and wikilink color loss limitations under "Table cell vim modality"; textarea content sync race condition → Fixed
  • docs/features/tables.md: Added Live Preview callout for cell editors

Full Changelog: 0.63.0...0.64.0

Don't miss a new motions release

NewReleases is sending notifications on new releases.