diff options
Diffstat (limited to '')
-rw-r--r-- | src/terminal.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/terminal.c b/src/terminal.c index 25a6a5d..648fc78 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -538,9 +538,16 @@ term_start( split_ea.addr_count = 1; } + int cmod_split_modified = FALSE; if (vertical) + { + if (!(cmdmod.cmod_split & WSP_VERT)) + cmod_split_modified = TRUE; cmdmod.cmod_split |= WSP_VERT; + } ex_splitview(&split_ea); + if (cmod_split_modified) + cmdmod.cmod_split &= ~WSP_VERT; if (curwin == old_curwin) { // split failed @@ -6164,8 +6171,16 @@ f_term_getjob(typval_T *argvars, typval_T *rettv) buf = term_get_buf(argvars, "term_getjob()"); if (buf == NULL) { - rettv->v_type = VAR_SPECIAL; - rettv->vval.v_number = VVAL_NULL; + if (in_vim9script()) + { + rettv->v_type = VAR_JOB; + rettv->vval.v_job = NULL; + } + else + { + rettv->v_type = VAR_SPECIAL; + rettv->vval.v_number = VVAL_NULL; + } return; } |