File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -109,7 +109,7 @@ local function show_for_real(options)
109
109
{
110
110
full_regexp_text = get_node_text (node , scratchnr ),
111
111
})
112
- return scratchnr
112
+ vim . api . nvim_buf_delete ( scratchnr , { force = true })
113
113
else
114
114
Buffers .hide_all ()
115
115
end
@@ -127,11 +127,8 @@ local M = {}
127
127
--- @param options ? RegexplainerOptions
128
128
function M .show (options )
129
129
disable_auto = true
130
- local scratchnr = show_for_real (options )
130
+ show_for_real (options )
131
131
disable_auto = false
132
- if scratchnr then
133
- vim .api .nvim_buf_delete (scratchnr , { force = true })
134
- end
135
132
end
136
133
137
134
--- Yank the explainer for the regexp under the cursor into a given register
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ local get_node_text = vim.treesitter.get_node_text or vim.treesitter.query.get_n
22
22
--- @field children ? RegexplainerComponent # Components may contain other components, e.g. capture groups
23
23
24
24
--- @class RegexplainerCaptureGroupComponent : RegexplainerParentComponent
25
- --- @field group_name ? boolean # a regexp component marked with `+`
25
+ --- @field group_name ? string # the name of the capture group, if it's a named group
26
26
--- @field capture_group ? number # which capture group does this group represent?
27
27
28
28
--- @alias RegexplainerComponentType
You can’t perform that action at this time.
0 commit comments