]> gitweb.fluxo.info Git - rhatto/dotfiles/vim.git/commitdiff
Fix: coding style
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 28 Jul 2024 21:47:09 +0000 (18:47 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 28 Jul 2024 21:47:09 +0000 (18:47 -0300)
vim.dot.link/plugin/session_workarounds.vim
vim.dot.link/plugin/window_title.vim

index af11f3da312f4482156ff9a42cd76b9133d0d377..3b43b5bd4e7216a183a5f6d8c74b981768b51460 100644 (file)
@@ -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
index bb8297793535d43b317a13d4d89af80cb3948e57..b602af1be28abdf29a7b103cabc54e7d6e5da848 100644 (file)
@@ -18,10 +18,10 @@ augroup END
 "
 " Thanks to http://stackoverflow.com/questions/1673649/vimrc-action-onclose
 function! ResetTitle(title)
-    " disable vim's ability to set the title
-    exec "set title t_ts='' t_fs=''"
+  " disable vim's ability to set the title
+  exec "set title t_ts='' t_fs=''"
 
-    " and restore it
-    "exec ":!echo -e '\033kbash\033\\'\<CR>"
-    exec ":!xtitle -q " a:title
+  " and restore it
+  "exec ":!echo -e '\033kbash\033\\'\<CR>"
+  exec ":!xtitle -q " a:title
 endfunction