From b1acf6712db8b1754517dd0d8d67b52e75d684b5 Mon Sep 17 00:00:00 2001 From: haya14busa Date: Thu, 28 Jan 2016 17:57:37 +0900 Subject: [PATCH] Init with overwin motions fix #268 --- autoload/EasyMotion.vim | 5 +++++ autoload/EasyMotion/overwin.vim | 2 ++ 2 files changed, 7 insertions(+) diff --git a/autoload/EasyMotion.vim b/autoload/EasyMotion.vim index 3273db3..a8f563a 100644 --- a/autoload/EasyMotion.vim +++ b/autoload/EasyMotion.vim @@ -16,7 +16,12 @@ let s:DIRECTION = { 'forward': 0, 'backward': 1, 'bidirection': 2} " Init: {{{ +let s:loaded = s:FALSE function! EasyMotion#init() + if s:loaded + return + endif + let s:loaded = s:TRUE call EasyMotion#highlight#load() " Store previous motion info let s:previous = {} diff --git a/autoload/EasyMotion/overwin.vim b/autoload/EasyMotion/overwin.vim index c9e5bfd..9cdff16 100644 --- a/autoload/EasyMotion/overwin.vim +++ b/autoload/EasyMotion/overwin.vim @@ -1,6 +1,8 @@ let s:V = vital#of('easymotion') let s:HitAHintMotion = s:V.import('HitAHint.Motion') +call EasyMotion#init() + function! EasyMotion#overwin#move(pattern) abort return s:HitAHintMotion.move(a:pattern, { \ 'keys': g:EasyMotion_keys,