mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
patch 9.1.1240: Regression with ic/ac text objects and comment plugin
Problem: Regression with ic/ac text objects and comment plugin Solution: Fix regression, update tests (Maxim Kim) fix regression: sometimes ic/ac should be line-wise ``` int main() { // multilple comments // cursor is between them } # dac -> int main() { } ``` closes: #16947 closes: #16980 Signed-off-by: Maxim Kim <habamax@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f9f4e27ad7
commit
08283b28af
@ -151,7 +151,7 @@ export def ObjComment(inner: bool)
|
||||
endif
|
||||
endif
|
||||
|
||||
if (pos_end[2] == (getline(pos_end[1])->len() ?? 1)) && pos_start[2] == 1
|
||||
if (pos_end[2] == (getline(pos_end[1])->len() ?? 1)) && pos_start[2] <= 1
|
||||
cursor(pos_end[1], 1)
|
||||
normal! V
|
||||
cursor(pos_start[1], 1)
|
||||
|
Reference in New Issue
Block a user