File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -262,7 +262,12 @@ local function run_in_terminal(self, request)
262262 terminal_width = terminal_win and api .nvim_win_get_width (terminal_win ) or 80
263263 terminal_height = terminal_win and api .nvim_win_get_height (terminal_win ) or 40
264264 end
265- api .nvim_buf_set_name (terminal_buf , ' [dap-terminal] ' .. (self .config .name or body .args [1 ]))
265+ local terminal_buf_name = ' [dap-terminal] ' .. (self .config .name or body .args [1 ])
266+ local terminal_name_ok = pcall (api .nvim_buf_set_name , terminal_buf , terminal_buf_name )
267+ if not terminal_name_ok then
268+ log .warn (terminal_buf_name .. ' is not a valid buffer name' )
269+ api .nvim_buf_set_name (terminal_buf , ' [dap-terminal] <?>' )
270+ end
266271 pcall (api .nvim_buf_del_keymap , terminal_buf , " t" , " <CR>" )
267272 local ok , path = pcall (api .nvim_buf_get_option , cur_buf , ' path' )
268273 if ok then
You can’t perform that action at this time.
0 commit comments