fix(lists): VimwikiToggleRejectedListItem -range parity (P3)
Upstream's :VimwikiToggleRejectedListItem is -range and binds glx in visual mode; nuwiki's four defs were bare, so a ranged invocation raised E481 and acted cursor-only. Same -range class already fixed for ToggleListItem/Increment/Decrement -- ToggleRejected was missed. All four defs (Vim+Neovim x Vimwiki*/Nuwiki*) are now -range, routed through a new reject_list_item_range(l1, l2) looping over_range in both clients, mirroring toggle_list_item_range. Visual glx stays cursor-only, consistent with its <C-Space>/gln/glp siblings. Also logs the 2026-06-02 re-audit findings in development/vimwiki-gap.md: RemoveDone lost -range (low pri); config gaps list_margin semantics/markdown-default, diary_months, markdown_header_style, diary_caption_level=-1; and the path_html/template_path default-location divergences. Mappings audit came back clean. Tests: cmd.reject_list_item_range (test-keymaps.lua), cmd.VimwikiToggleRejectedListItem_accepts_range (test-keymaps-vim.vim). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -669,6 +669,24 @@ call s:record(
|
||||
\ 'cmd.VimwikiListChangeLvl_accepts_range_and_args',
|
||||
\ 'err=' . s:lcl_err)
|
||||
|
||||
" ===== :VimwikiToggleRejectedListItem -range =====
|
||||
" Was bare (range-less): `:1,3VimwikiToggleRejectedListItem` raised E481. The
|
||||
" reject is an LSP roundtrip (no server here), so assert only the attribute
|
||||
" parse: no E481.
|
||||
call s:set_buf(['- [ ] a', '- [ ] b', '- [ ] c'])
|
||||
let s:trl_err = ''
|
||||
try
|
||||
silent 1,3VimwikiToggleRejectedListItem
|
||||
catch /E481/
|
||||
let s:trl_err = v:exception
|
||||
catch
|
||||
" non-E481 (e.g. no LSP attached) is expected and fine here.
|
||||
endtry
|
||||
call s:record(
|
||||
\ s:trl_err ==# '' ? 1 : 0,
|
||||
\ 'cmd.VimwikiToggleRejectedListItem_accepts_range',
|
||||
\ 'err=' . s:trl_err)
|
||||
|
||||
" ===== :VimwikiSplitLink -nargs=* =====
|
||||
" Upstream takes optional reuse/move-cursor flags; nuwiki's defs took none, so
|
||||
" `:VimwikiSplitLink 0 1` raised E488. Now -nargs=*: assert the arg parse
|
||||
|
||||
Reference in New Issue
Block a user