File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,12 @@ if exists("g:scSplitSize")
7878 let s: scSplitSize = g: scSplitSize
7979endif
8080
81+
82+ let s: scTerminalBuffer = " off"
83+ if exists (" g:scTerminalBuffer" )
84+ let s: scTerminalBuffer = g: scTerminalBuffer
85+ endif
86+
8187" ========================================================================================
8288
8389function ! FindOuterMostBlock ()
@@ -219,6 +225,10 @@ endfunction
219225
220226let s: sclangStarted = 0
221227
228+ function s: TerminalEnabled ()
229+ return exists (" :term" ) && (s: scTerminalBuffer == " on" )
230+ endfunction
231+
222232function s: KillSClangBuffer ()
223233 if bufexists (bufname (' start_pipe' ))
224234 exec ' bd! start_pipe'
@@ -246,7 +256,7 @@ function SClangStart(...)
246256 call system (" screen -S " . l: screenName . " -X resize " . l: splitSize . ' %' )
247257 call system (" screen -S " . l: screenName . " -X bindkey -k k5" )
248258 endif
249- elseif exists ( " :term " )
259+ elseif s: TerminalEnabled ( )
250260 let l: term = " :term "
251261 if ! has (" nvim" )
252262 let l: term .= " ++curwin ++close "
You can’t perform that action at this time.
0 commit comments