aboutsummaryrefslogtreecommitdiff
path: root/vim.dot.link/plugin/session_workarounds.vim
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2024-07-28 18:47:09 -0300
committerSilvio Rhatto <rhatto@riseup.net>2024-07-28 18:47:09 -0300
commit91baa371aaf7cfa58496f97405ae6b5c040ab8e4 (patch)
treed85ed84f4c248e22563b565c82864ba7453cac28 /vim.dot.link/plugin/session_workarounds.vim
parent2a5476d79b9db791200a8d38ac7fd552aff46783 (diff)
downloadvim-91baa371aaf7cfa58496f97405ae6b5c040ab8e4.tar.gz
vim-91baa371aaf7cfa58496f97405ae6b5c040ab8e4.tar.bz2
Fix: coding style
Diffstat (limited to 'vim.dot.link/plugin/session_workarounds.vim')
-rw-r--r--vim.dot.link/plugin/session_workarounds.vim26
1 files changed, 13 insertions, 13 deletions
diff --git a/vim.dot.link/plugin/session_workarounds.vim b/vim.dot.link/plugin/session_workarounds.vim
index af11f3d..3b43b5b 100644
--- a/vim.dot.link/plugin/session_workarounds.vim
+++ b/vim.dot.link/plugin/session_workarounds.vim
@@ -58,25 +58,25 @@ endfunction
" https://vi.stackexchange.com/questions/8926/is-it-possible-to-obtain-the-displayable-area-width-and-height-of-current-buffe
"let lines_initial=&l:lines
function FixWindowHeights()
- " Set the maximum available height
- set lines=999
+ " Set the maximum available height
+ set lines=999
- " Set the lines depending on the LINES environment variable
- " or through tput.
- "
- " This is not always inherited by vim:
- " https://github.com/vim/vim/issues/12160
- if $LINES != ""
- execute ':set lines=' . $LINES
- else
- let available_lines = system('tput lines')
- execute ':set lines=' . available_lines
+ " Set the lines depending on the LINES environment variable
+ " or through tput.
+ "
+ " This is not always inherited by vim:
+ " https://github.com/vim/vim/issues/12160
+ if $LINES != ""
+ execute ':set lines=' . $LINES
+ else
+ let available_lines = system('tput lines')
+ execute ':set lines=' . available_lines
" Old, and not working approach that tries to reuse the initial height
"else
" execute ':set lines=' . lines_initial
" set lines=999
" execute ':set lines=' . winheight(0) - 3
- endif
+ endif
endfunction
" Restore all window sizes