File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed
Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -63,29 +63,7 @@ local function defer_resize_term(min_cols)
6363 return orig_columns
6464end
6565
66- local open_term_command_from_nvim_version = function ()
67- if vim .fn .has (' nvim-0.11' ) == 1 then
68- -- intentionally pass an invalid argument type to term
69- -- if an error is returned that it must be boolean then term exists for jobstart
70- --- @type boolean , integer | string
71- local ok , err = pcall (vim .fn .jobstart , ' ' , { term = 1 })
72- local jobstart_has_term = not ok
73- and err :match ([[ Vim:E475: Invalid argument: 'term' must be Boolean]] )
74- and true
75- or false
76- if jobstart_has_term then
77- return ' jobstart'
78- else
79- -- using Neovim v0.11, however, it is on a commit before implementing term on jobstart
80- return ' termopen'
81- end
82- else
83- -- earlier versions of Neovim use termopen
84- return ' termopen'
85- end
86- end
87-
88- M .open_term_command = open_term_command_from_nvim_version ()
66+ M .open_term_command = vim .fn .has (' nvim-0.11' ) <= 0 and ' termopen' or ' jobstart'
8967
9068--- @param get_text_opts KsbKittyGetTextArguments
9169--- @param on_exit_cb function
You can’t perform that action at this time.
0 commit comments