-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
fix(cursor): re-add new VSCodeNotifyRange impl #1358
Conversation
end | ||
|
||
function M.notify_range(command, line1, line2, leaveSelection, ...) | ||
return M.notify_extension('range-command', command, 'V', line1, line2, 1, 1, leaveSelection, { ... }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems overwrought to have all these dedicated variants. call()
and notify()
could cover all these variations with a "kwargs" style dict parameter. That would also simplify the documentation. It also makes the calls, and usage, much easier to understand, instead of having 4+ positional args.
The variadic args ...
could just be a list, there's no benefit to variadic args here: they are hard to visually parse vs the non-variadic args.
notify('foo', { arg1, arg2, … } {
line1=…, -- if `nil`, treat as non-range command
line2=…, -- if `nil`, treat as non-range command
col1=…, -- optional, treat as "line" if `nil` but `line1` was provided
col2=…, -- optional, treat as "line" if `nil` but `line2` was provided
}
Adds
VSCodeNotifyRange
but with a more concise and accurate impl. Fixes #1355, fixes #1351, fixes #1345.Also re-adds
VSCodeCommentary
and fixes a bug withVSCodeNotify
.