# HG changeset patch # User Jethro Van Thuyne # Date 1462282036 -7200 # Node ID 7848d65f04253b10af74297dc54eea313b22ebaa # Parent bd953da766180c9197e0abad7eae716d9dea56e8 Add optional parameter for window height If g:clam_winheight is set, the output buffer will resize itself horizontally to the desired height. diff -r bd953da76618 -r 7848d65f0425 doc/clam.txt --- a/doc/clam.txt Fri Mar 25 21:40:12 2016 +0000 +++ b/doc/clam.txt Tue May 03 15:27:16 2016 +0200 @@ -16,6 +16,8 @@ 2.2 Pipe ....................... |ClamPipe| 3. Configuration ................... |ClamConfiguration| 3.1 g:clam_autoreturn .......... |ClamConfiguration_autoreturn| + 3.2 g:clam_winpos .............. |ClamConfiguration_winpos| + 3.3 g:clam_winheight ........... |ClamConfiguration_winheight| 4. License ......................... |ClamLicense| 5. Bugs ............................ |ClamBugs| 6. Contributing .................... |ClamContributing| @@ -124,6 +126,15 @@ Default: 'vertical botright' (split vertical, open at far right) +------------------------------------------------------------------------------ +3.3 g:clam_winheight *ClamConfiguration_winheight* + +This option controls the height of the output window: > + + let g:clam_winheight = 5 + +Default: no value (horizontal split at 50%) + ============================================================================== 4. License *ClamLicense* diff -r bd953da76618 -r 7848d65f0425 plugin/clam.vim --- a/plugin/clam.vim Fri Mar 25 21:40:12 2016 +0000 +++ b/plugin/clam.vim Tue May 03 15:27:16 2016 +0200 @@ -34,6 +34,9 @@ " Open the new window (or move to an existing one). if winnr < 0 silent! execute g:clam_winpos . ' new ' . buffer_name + if exists('g:clam_winheight') "{{{ + silent! execute 'resize ' . g:clam_winheight + endif "}}} " Highlight ANSI color codes if the AnsiEsc plugin is present. if exists("g:loaded_AnsiEscPlugin") @@ -41,6 +44,9 @@ endif else silent! execute winnr . 'wincmd w' + if exists('g:clam_winheight') "{{{ + silent! execute 'resize ' . g:clam_winheight + endif "}}} endif endfunction " }}} function! s:ExtractBareCommanName(fullCommand) " {{{