diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-12-30 08:36:48 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-12-30 08:36:48 +0100 |
commit | 6783bd0df98094539c752e3281035e1b92d6af69 (patch) | |
tree | e6e183f08660bc150d54de60ee15bcf71d16d89f /autoload/focau/init.vim | |
parent | dc786b7641741eadadab10b507fcfd4c1ff1813a (diff) | |
download | vim-polyglot-6783bd0df98094539c752e3281035e1b92d6af69.tar.gz vim-polyglot-6783bd0df98094539c752e3281035e1b92d6af69.zip |
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.
Diffstat (limited to 'autoload/focau/init.vim')
-rw-r--r-- | autoload/focau/init.vim | 33 |
1 files changed, 0 insertions, 33 deletions
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 <expr> maps, because we need side-effects -" ALT: {s: <C-g>...<C-g>, o: <Esc>, i: <C-o>, c: <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': '<C-r>='}) - for m in split(ms, '\zs') - exe m.'noremap <silent> '.key.' '.prf.'<SID>F'.i.'()<CR>' - 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 |