Rename from_selection to visual in extract.opts

This commit is contained in:
Mathias Fussenegger 2023-06-22 09:05:41 +02:00 committed by Mathias Fußenegger
parent 17e743b224
commit c6a3c47a0c
2 changed files with 4 additions and 4 deletions

View file

@ -66,7 +66,7 @@ jdtls.extract.opts *jdtls.extract.opts*
|"prompt"
Type: ~
{from_selection?:boolean,name?:string|fun():string}
{visual?:boolean,name?:string|fun():string}
M.extract_constant({opts?}) *jdtls.extract_constant*

View file

@ -979,7 +979,7 @@ end
---|"prompt"
---@alias jdtls.extract.opts {from_selection?: boolean, name?: string|fun(): string}
---@alias jdtls.extract.opts {visual?: boolean, name?: string|fun(): string}
---@param entity string
@ -989,10 +989,10 @@ local function extract(entity, opts)
if type(opts) == "boolean" then
-- bwc, param changed from boolean to table
opts = {
from_selection = opts
visual = opts
}
end
local params = make_code_action_params(opts.from_selection or false)
local params = make_code_action_params(opts.visual or false)
local command = { arguments = { entity }, }
local after_refactor = function()
local name = opts.name