Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update usr_52.{txt,jax} #1994

Merged
merged 1 commit into from
Mar 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions doc/usr_52.jax
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*usr_52.txt* For Vim バージョン 9.1. Last change: 2024 Oct 07
*usr_52.txt* For Vim バージョン 9.1. Last change: 2025 Mar 12

VIM USER MANUAL - by Bram Moolenaar

Expand Down Expand Up @@ -367,11 +367,10 @@ Vim を起動したときにアクティブになります。|add-plugin|: >
endif
var [beg, end] = [getpos("'["), getpos("']")]
var type = v:event.regtype ?? 'v'
var pos = getregionpos(beg, end, {type: type})
var end_offset = (type == 'V' || v:event.inclusive) ? 1 : 0
var pos = getregionpos(beg, end, {type: type, exclusive: false})
var m = matchaddpos(hlgroup, pos->mapnew((_, v) => {
var col_beg = v[0][2] + v[0][3]
var col_end = v[1][2] + v[1][3] + end_offset
var col_end = v[1][2] + v[1][3] + 1
return [v[0][1], col_beg, col_end - col_beg]
}))
var winid = win_getid()
Expand Down
7 changes: 3 additions & 4 deletions en/usr_52.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*usr_52.txt* For Vim version 9.1. Last change: 2024 Oct 07
*usr_52.txt* For Vim version 9.1. Last change: 2025 Mar 12

VIM USER MANUAL - by Bram Moolenaar

Expand Down Expand Up @@ -362,11 +362,10 @@ and it will be active next time you start Vim. |add-plugin|: >
endif
var [beg, end] = [getpos("'["), getpos("']")]
var type = v:event.regtype ?? 'v'
var pos = getregionpos(beg, end, {type: type})
var end_offset = (type == 'V' || v:event.inclusive) ? 1 : 0
var pos = getregionpos(beg, end, {type: type, exclusive: false})
var m = matchaddpos(hlgroup, pos->mapnew((_, v) => {
var col_beg = v[0][2] + v[0][3]
var col_end = v[1][2] + v[1][3] + end_offset
var col_end = v[1][2] + v[1][3] + 1
return [v[0][1], col_beg, col_end - col_beg]
}))
var winid = win_getid()
Expand Down