Skip to content

test(keymap): react to Nightly changes regarding autoindent#2428

Merged
echasnovski merged 1 commit into
nvim-mini:mainfrom
abeldekat:test_keymap
May 23, 2026
Merged

test(keymap): react to Nightly changes regarding autoindent#2428
echasnovski merged 1 commit into
nvim-mini:mainfrom
abeldekat:test_keymap

Conversation

@abeldekat
Copy link
Copy Markdown
Member

@abeldekat abeldekat commented May 23, 2026

Details:

  • See PR 39961 in neovim/neovim

I wasn't able to fix this properly. The test now passes because I disabled autoindent, allowing the third line to be empty.

I wonder why the nvim-autopairs mock is more specific than the other mocks, which mostly add a line to the _G.log. Is the comment stating -- Mock exactly how 'nvim-autopairs' works here still applicable? Perhaps a simple _G.log addition is enough.

The failing test:

FAIL in tests/test_keymap.lua | map_multistep() | built-in steps | nvimautopairs_cr:
  Failed expectation for equality
  Cause: different values at key 3, left = ")", right = ""
  Left:  { "", "(", ")", "" }
  Right: { "", "(", "", ")" }
  Traceback:
    tests/test_keymap.lua:1088

EDIT:
I think this issue can also be closed...

EDIT2:
It's strange that the third empty line is now subject to truncation. Maybe the vim-patch is not selective enough?

@echasnovski
Copy link
Copy Markdown
Member

Thanks for the PR!

I wonder why the nvim-autopairs mock is more specific than the other mocks, which mostly add a line to the _G.log. Is the comment stating -- Mock exactly how 'nvim-autopairs' works here still applicable?

Mostly because it requires extra key translation to be useful. And that sequence of keys is exactly what 'nvim-autopairs' uses.

As the matter of fact, the 'nvim-autopairs' plugin itself now acts on Nightly exactly as is detected by 'mini.keymap' test. It might be the problem in either vim-patch or 'nvim-autopairs'. Don't really have the bandwidth to investigate this (although it would probably be a net positive for Neovim ecosystem :) ).

Comment thread tests/test_keymap.lua Outdated
Details:
- See PR 39961 in neovim/neovim
@echasnovski echasnovski merged commit 4465783 into nvim-mini:main May 23, 2026
9 of 11 checks passed
@abeldekat abeldekat deleted the test_keymap branch May 23, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants