aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION2
-rw-r--r--doc/equalalways_resized.txt5
-rw-r--r--plugin/equalalways_resized.vim15
3 files changed, 6 insertions, 16 deletions
diff --git a/VERSION b/VERSION
index 0ea3a94..0d91a54 100644
--- a/VERSION
+++ b/VERSION
@@ -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