Skip to content

Fix builtin.registers#3463

Open
mathiasuk wants to merge 1 commit into
nvim-telescope:masterfrom
mathiasuk:push-nnqzlmpmzrqr
Open

Fix builtin.registers#3463
mathiasuk wants to merge 1 commit into
nvim-telescope:masterfrom
mathiasuk:push-nnqzlmpmzrqr

Conversation

@mathiasuk
Copy link
Copy Markdown

Fix editing a letter register (A-Z) would always append to the register, fixed by editing a-z instead.

Fix picker not updating after editing a register.

Fix editing of read-only registers

Description

Fix three small bugs reported in #3462:

  • Editing read-only registers results in error
  • Editing named registers appends to content instead of replace
  • Editing a register does not refresh the picker.

Fixes #3462

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list relevant details about your configuration

  • [ x] Edited named and read-only registers, named registers are updated as expected, read-only are ignored, picker is refrshed.

Configuration:

  • Neovim version (nvim --version): NVIM v0.11.0
    Build type: Release
    LuaJIT 2.1.1741730670
  • Operating system and version: Debian Testing 13

Checklist:

  • [ x] My code follows the style guidelines of this project (stylua)
  • [ x] I have performed a self-review of my own code
  • [ x] I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations) ((Not applicable)

Fix editing a letter register (A-Z) would always append to the register,
fixed by editing a-z instead.

Fix picker not updating after editing a register.

builtin.registers: Fix editing of read-only registers
Comment on lines +451 to +452
-- %, : and . are read-only registers
return false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldnt return false here. also we should probably warn here. something using utils.notify

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Misc bugs with builtin.registers

2 participants