Skip to content

Releases: khoido2003/multiple-cursor.nvim

v0.1.3

14 Jan 07:40

Choose a tag to compare

Added

  • Persistent colorscheme listener

Fixed

  • Duplicate Line Bug: Removed duplicate assignment of original_pos in state.lua
  • Unused Variables: Cleaned up unused bufnr variables in editor.lua and skipped_count in ui.lua

Improved

  • Memory Efficiency: Replaced vim.deepcopy() with shallow copies in state.lua for cursor position tables (reduces allocation overhead)
  • O(1) Position Lookups: Added hash sets (cursor_set, skipped_set) for instant position checks instead of O(n) array scans - significant speedup with many matches
  • Buffer Safety: Added buffer validity check in finder.find_matches() to prevent errors on invalid buffers
  • Resource Cleanup: Added editor.cleanup() function to properly reset module state
  • Keymap Management: Added keymaps.clear_global_keymaps() for proper plugin unload cleanup

Removed

  • Unused current Highlight: Removed the current highlight configuration (was defined but never used)

Full Changelog: v0.1.2...v0.1.3

v0.1.2

13 Jan 08:50

Choose a tag to compare

Added

  • Floating Overlay Window: Configurable floating overlay for selection count display.
    • Positions: top-left, top-right, bottom-left, bottom-right
    • Configurable padding and colors via highlight_definitions.overlay
  • Visual Selection Support: Ctrl+N now works on visual selection (not just word under cursor)
  • Insert Keys: Added I (insert at start) and A (append at end) edit modes
  • Undo Cursor: Added Ctrl+U to remove the last added cursor
  • Vim-style Operators: Apply operations to all selected words at once:
    • gy - Yank all selected words
    • g~ - Toggle case
    • gu - Lowercase all
    • gU - Uppercase all
  • Smart Re-scan: Automatically finds all matches of new word after editing completes (seamlessly continue selecting)

Fixed

  • Overlay Resize: Overlay now repositions when terminal window is resized
  • Overlay Position Clamping: Prevents negative positions on narrow windows
  • Multi-line Editing: Improved sync for cursors across different lines
  • Delete Behavior: d operator now keeps multi-cursor mode active (allows d then i workflow)
  • Delete Highlights: Fixed confusing highlight jumps after deletion; now shows cursor markers
  • Duplicate Annotations: Removed duplicate @return comments in state.lua

v0.1.1

10 Jan 11:05

Choose a tag to compare

Added

  • Configurable Highlights: Added highlight_definitions option to setup() allowing full customization of cursor, match, and skipped colors.

Changed

  • Refined Defaults: Updated default highlight colors to be more vivid and high-contrast (Black text on Bright Backgrounds) for better visibility across all colorschemes.

Fixed

  • Critical Edit Bug: Fixed issue where entering insert mode at the start of a word (i) would delete the rest of the word. Implemented robust delta-based synchronization.
  • Navigation Logic: Fixed Ctrl+N jumping to incorrect match when selecting out of order. Now consistently jumps to the nearest unselected match relative to cursor.
  • EOL Cursor Fix: Fixed cursor positioning when editing a word at the end of the line. Now correctly appends instead of landing on the last character.

Improved

  • Unpacked Startup: Refactored internal init.lua to lazy-load modules, significantly improving startup time.
  • Edit Cursor Position: When entering edit mode from an unselected position, cursor now defaults to the end of the word instead of the start.

v0.1.0

10 Jan 08:41

Choose a tag to compare

First release