mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
termdebug.vim: vertical layout #10424
This commit is contained in:
parent
48efafc81c
commit
7535f843cd
@ -119,10 +119,14 @@ func s:StartDebug_internal(dict)
|
|||||||
let s:startsigncolumn = &signcolumn
|
let s:startsigncolumn = &signcolumn
|
||||||
|
|
||||||
let s:save_columns = 0
|
let s:save_columns = 0
|
||||||
|
let s:allleft = 0
|
||||||
if exists('g:termdebug_wide')
|
if exists('g:termdebug_wide')
|
||||||
if &columns < g:termdebug_wide
|
if &columns < g:termdebug_wide
|
||||||
let s:save_columns = &columns
|
let s:save_columns = &columns
|
||||||
let &columns = g:termdebug_wide
|
let &columns = g:termdebug_wide
|
||||||
|
" If we make the Vim window wider, use the whole left halve for the debug
|
||||||
|
" windows.
|
||||||
|
let s:allleft = 1
|
||||||
endif
|
endif
|
||||||
let s:vertical = 1
|
let s:vertical = 1
|
||||||
else
|
else
|
||||||
@ -140,7 +144,7 @@ endfunc
|
|||||||
|
|
||||||
func s:StartDebug_term(dict)
|
func s:StartDebug_term(dict)
|
||||||
" Open a terminal window without a job, to run the debugged program in.
|
" Open a terminal window without a job, to run the debugged program in.
|
||||||
execute 'new'
|
execute s:vertical ? 'vnew' : 'new'
|
||||||
let s:pty_job_id = termopen('tail -f /dev/null;#gdb program')
|
let s:pty_job_id = termopen('tail -f /dev/null;#gdb program')
|
||||||
if s:pty_job_id == 0
|
if s:pty_job_id == 0
|
||||||
echoerr 'invalid argument (or job table is full) while opening terminal window'
|
echoerr 'invalid argument (or job table is full) while opening terminal window'
|
||||||
@ -157,6 +161,10 @@ func s:StartDebug_term(dict)
|
|||||||
" Assuming the source code window will get a signcolumn, use two more
|
" Assuming the source code window will get a signcolumn, use two more
|
||||||
" columns for that, thus one less for the terminal window.
|
" columns for that, thus one less for the terminal window.
|
||||||
exe (&columns / 2 - 1) . "wincmd |"
|
exe (&columns / 2 - 1) . "wincmd |"
|
||||||
|
if s:allleft
|
||||||
|
" use the whole left column
|
||||||
|
wincmd H
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Create a hidden terminal window to communicate with gdb
|
" Create a hidden terminal window to communicate with gdb
|
||||||
|
Loading…
Reference in New Issue
Block a user