You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling ToggleTermSetName with a count opens the dialogue to enter a new name, and typing a name and hitting <CR> results in the error "attempt to index local 'term' (a nil value)".
Expected Behavior
The specified terminal should be renamed without error.
Steps To Reproduce
Minimal init.lua to reproduce the above behaviour:
locallazypath=vim.fn.stdpath('data') ..'/lazy/lazy.nvim'ifnotvim.loop.fs_stat(lazypath) thenvim.fn.system({
'git',
'clone',
'--filter=blob:none',
'https://github.com/folke/lazy.nvim.git',
'--branch=stable', -- latest stable releaselazypath,
})
endvim.opt.rtp:prepend(lazypath)
-- Lazy load pluginsrequire("lazy").setup {
{
'akinsho/toggleterm.nvim',
version="*",
lazy=true,
cmd= {
'ToggleTerm',
'TermSelect',
"ToggleTermSendCurrentLine",
"ToggleTermSendVisualLines",
"ToggleTermSendVisualSelection",
"ToggleTermSetName",
},
keys= { [[<C-`>]] },
config=function ()
require("toggleterm").setup {
open_mapping=[[<C-`>]],
insert_mappings=true, -- whether or not the open mapping applies in insert modeterminal_mappings=true, -- whether or not the open mapping applies in the opened terminalsclose_on_exit=true, -- close the terminal window when the process exits-- Change the default shell. Can be a string or a function returning a stringshell=vim.o.shell,
auto_scroll=true, -- automatically scroll to the bottom on terminal output-- This field is only relevant if direction is set to 'float'
}
vim.keymap.set('n', '<A-r>', '<CMD>ToggleTermSetName<CR>', {noremap=true})
end
}
}
Run:
a. Create two terminals with <C-`><Esc>2<C-`><Esc>.
c. Type 2<A-r>.
Environment
- OS: Ubuntu 22.04.2 LTS running as a WSL2 distro in Windows 11
- neovim version: 0.9.2
- Shell: bash
- Terminal: wezterm
Anything else?
Thanks for your work on this plugin, I rely on it quite extensively!
The text was updated successfully, but these errors were encountered:
Is there an existing issue for this?
Current Behavior
Calling
ToggleTermSetName
with a count opens the dialogue to enter a new name, and typing a name and hitting<CR>
results in the error "attempt to index local 'term' (a nil value)".Expected Behavior
The specified terminal should be renamed without error.
Steps To Reproduce
init.lua
to reproduce the above behaviour:a. Create two terminals with
<C-`><Esc>2<C-`><Esc>
.c. Type
2<A-r>
.Environment
Anything else?
Thanks for your work on this plugin, I rely on it quite extensively!
The text was updated successfully, but these errors were encountered: