patch 9.1.1293: comment plugin does not handle 'exclusive' selection for comment object

Problem:  comment plugin does not handle 'exclusive' selection for
          comment object (@mawkish)
Solution: handle special case selection='exclusive' for inline comment
          object (Maxim Kim)

fixes: #17023
closes: #17098

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Maxim Kim
2025-04-12 11:34:08 +02:00
committed by Christian Brabandt
parent c8ce81b0dc
commit 0e59e67a63
3 changed files with 28 additions and 0 deletions

View File

@ -158,6 +158,9 @@ export def ObjComment(inner: bool)
else
cursor(pos_end[1], pos_end[2])
normal! v
if &selection == 'exclusive'
normal! lo
endif
cursor(pos_start[1], pos_start[2])
endif
enddef