Skip to content

fix(ui): Prevent keymap leakage and harden persist/config reliability#14

Merged
mhiro2 merged 5 commits into
mainfrom
fix/prevent-keymap-leakage
Feb 23, 2026
Merged

fix(ui): Prevent keymap leakage and harden persist/config reliability#14
mhiro2 merged 5 commits into
mainfrom
fix/prevent-keymap-leakage

Conversation

@mhiro2
Copy link
Copy Markdown
Owner

@mhiro2 mhiro2 commented Feb 23, 2026

Summary

  • Prevent popup keymaps from leaking into source buffers when using buffer_mode = "source"
  • Sanitize invalid close_events config entries with graceful fallback to defaults
  • Always invoke on_done callback in persist operations even when disabled
  • Use synchronous save on VimLeavePre to ensure session data is persisted before Neovim exits

Changes

  • 4f2dbe9 : fix(ui): prevent source mode keymap leakage
    • Skip installing popup-specific keymaps when buffer_mode = "source" to avoid polluting real editing
      buffers
    • Add test to verify keymaps are never added to source buffers
  • 7bc6d3c : fix(config): sanitize close_events with fallback
    • Filter out non-string and empty entries from close_events arrays instead of rejecting the entire config
    • Fall back to default events when the sanitized list is empty or the value is not a table
  • a5e6562 : fix(persist): always resolve on_done when disabled
    • Call on_done(false) in save_current and restore when persist is disabled
    • Ensures callers can rely on the callback being invoked in all code paths
  • aeee02f : fix(persist): use sync save path on leave
    • Switch to synchronous file write during VimLeavePre to guarantee data is saved before exit
    • Add write_sync function to store module with atomic write pattern (tmp file + rename)

@mhiro2 mhiro2 self-assigned this Feb 23, 2026
@mhiro2 mhiro2 added the bug Something isn't working label Feb 23, 2026
@mhiro2 mhiro2 merged commit 138cec0 into main Feb 23, 2026
3 checks passed
@mhiro2 mhiro2 deleted the fix/prevent-keymap-leakage branch February 23, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant