From 7c943c2ed72d31385e2ce29bebdfc9524c0d740f Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Sat, 11 Jul 2020 14:08:45 +0100 Subject: [PATCH] Fix the terminal window to 80 columns --- autoload/vimspector/internal/neoterm.vim | 9 +++++++-- python3/vimspector/code.py | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/autoload/vimspector/internal/neoterm.vim b/autoload/vimspector/internal/neoterm.vim index 381a6b0..c6e798e 100644 --- a/autoload/vimspector/internal/neoterm.vim +++ b/autoload/vimspector/internal/neoterm.vim @@ -46,12 +46,17 @@ function! vimspector#internal#neoterm#ResetEnvironment( env, old_env ) abort endfunction function! vimspector#internal#neoterm#Start( cmd, opts ) abort + " Prepare current buffer to be turned into a term if curwin is not set if ! get( a:opts, 'curwin', 0 ) + let mods = '' if get( a:opts, 'vertical', 0 ) - vnew + let mods .= 'vertical ' + let mods .= get( a:opts, 'term_cols', '' ) else - new + let mods .= get( a:opts, 'term_rows', '' ) endif + + execute mods . 'new' endif " HACK: Neovim's termopen doesn't support env diff --git a/python3/vimspector/code.py b/python3/vimspector/code.py index 149af0d..b5a0e9b 100644 --- a/python3/vimspector/code.py +++ b/python3/vimspector/code.py @@ -40,7 +40,6 @@ class CodeView( object ): 'breakpoints': [] } - with utils.LetCurrentWindow( self._window ): vim.command( 'nnoremenu WinBar.Continue :call vimspector#Continue()' ) vim.command( 'nnoremenu WinBar.Next :call vimspector#StepOver()' ) @@ -221,6 +220,7 @@ class CodeView( object ): options = { 'vertical': 1, + 'term_cols': 80, 'norestore': 1, 'cwd': cwd, 'env': env,