From 6783bd0df98094539c752e3281035e1b92d6af69 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Wed, 30 Dec 2020 08:36:48 +0100 Subject: Revert "Check changes for focus event, improves #638" It's because it additionally changes cursor to vertical bar. I need to disable this behavior and make it compatible with plugins that enable vertical cursor... This reverts commit 44e79fc935004c2e67fc39a77266d0f06e29d920. --- autoload/focau/init.vim | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 autoload/focau/init.vim (limited to 'autoload/focau/init.vim') diff --git a/autoload/focau/init.vim b/autoload/focau/init.vim deleted file mode 100644 index 7c9320ec..00000000 --- a/autoload/focau/init.vim +++ /dev/null @@ -1,33 +0,0 @@ -" WARNING: seems like we can't use maps, because we need side-effects -" ALT: {s: ..., o: , i: , c: e} -function! s:map_triggers(e) - for [a, i] in items({'FocusGained': 0, 'FocusLost': 1}) - let key = keys(a:e)[i] | exe 'set '.key.'='.a:e[key] - exe "fun! s:F".i."()\nif g:focau.active|sil! doau ".a."|en|return''\nendf" - for [ms, prf] in items({'nv': '@=', 'o': ':call ', 'ic': '='}) - for m in split(ms, '\zs') - exe m.'noremap '.key.' '.prf.'F'.i.'()' - endfor | endfor | endfor -endfunction - - -function! focau#init#main() - augroup focau - autocmd! - augroup END - - call focau#cursor#shape_preserve() - - if g:focau.auto - let g:focau.focuses = focau#events#auto_choose() - let g:focau.cursors = focau#cursor#auto_shape() - "" FIX: must be dynamic and check curr lang before each mode/lang-switch - " call s:focau_lang_choose() "primary/secondary - endif - - " Wrap choosen keys in event triggers - call s:map_triggers(g:focau.events) - " Start - call focau#events#enable(g:focau.active) - au focau VimEnter * if g:focau.active | sil! doau FocusGained | endif -endfunction -- cgit v1.2.3