diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-28 23:47:58 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-05-28 23:47:58 +1200 |
commit | 9e77bcd9cfd69a52c518a1f87dc343ce6e4b90a4 (patch) | |
tree | 6b0f8d83b41060bd9933a555fbd89087870d8e18 | |
parent | Merge branch 'release/v0.2.0' (diff) | |
parent | Bump VERSION (diff) | |
download | vim-equalalways-resized-master.tar.gz vim-equalalways-resized-master.zip |
* release/v0.3.0:
Pare down to just a few lines
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | doc/equalalways_resized.txt | 5 | ||||
-rw-r--r-- | plugin/equalalways_resized.vim | 15 |
3 files changed, 6 insertions, 16 deletions
@@ -1 +1 @@ -0.2.0 +0.3.0 diff --git a/doc/equalalways_resized.txt b/doc/equalalways_resized.txt index 44dcbd7..e4098df 100644 --- a/doc/equalalways_resized.txt +++ b/doc/equalalways_resized.txt @@ -1,4 +1,4 @@ -*equalalways_resized.txt* For Vim version 7.0 Last change: 2018 Aug 16 +*equalalways_resized.txt* For Vim version 7.0 Last change: 2019 May 28 DESCRIPTION *equalalways_resized* @@ -7,8 +7,7 @@ resized. REQUIREMENTS *equalalways_resized-requirements* -This plugin only loads if 'compatible' is not set. It requires the |+autocmd| -and |+windows| features, with the |VimResized| event introduced in |version7|. +This plugin only loads if 'compatible' is not set. AUTHOR *equalalways_resized-author* diff --git a/plugin/equalalways_resized.vim b/plugin/equalalways_resized.vim index 80ae548..436255d 100644 --- a/plugin/equalalways_resized.vim +++ b/plugin/equalalways_resized.vim @@ -5,23 +5,14 @@ " Author: Tom Ryder <tom@sanctum.geek.nz> " License: Same as Vim itself " -if exists('loaded_equalalways_resized') || &compatible - finish -endif -if !has('autocmd') || !has('windows') || !exists('##VimResized') +if exists('loaded_equalalways_resized') || &compatible || v:version < 700 finish endif let loaded_equalalways_resized = 1 -" If 'equalalways' is set, rebalance the windows -function! s:Rebalance() abort - if &equalalways - wincmd = - endif -endfunction - " Add hook for VimResized event augroup equalalways_resized autocmd! - autocmd VimResized * call s:Rebalance() + autocmd VimResized * + \ if &equalalways | wincmd = | endif augroup END |