diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-12-30 00:48:12 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-12-30 00:48:12 +0100 |
commit | 44e79fc935004c2e67fc39a77266d0f06e29d920 (patch) | |
tree | 8e4bd8aac7de50604d36acaff139df866c87a9cd /plugin/polyglot.vim | |
parent | 2fcb15afa09c6c5b53a3f37404a28b57a3f43d83 (diff) | |
download | vim-polyglot-44e79fc935004c2e67fc39a77266d0f06e29d920.tar.gz vim-polyglot-44e79fc935004c2e67fc39a77266d0f06e29d920.zip |
Check changes for focus event, improves #638
Diffstat (limited to 'plugin/polyglot.vim')
-rw-r--r-- | plugin/polyglot.vim | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/plugin/polyglot.vim b/plugin/polyglot.vim index bfd9c1a0..031dbe63 100644 --- a/plugin/polyglot.vim +++ b/plugin/polyglot.vim @@ -13,6 +13,22 @@ if exists('g:loaded_sensible') finish endif +if !has('gui_running') && (!has('nvim') || $TERM =~? '^rxvt') + let g:focau = extend({ + \ 'auto': 1, + \ 'active': 1, + \ 'events' : {'<F25>': "\e[I", '<F26>': "\e[O"}, + \ 'focuses': ["\e[?1004h", "\e[?1004l"], + \ 'screens': ["\e[?1049h", "\e[?1049l"], + \ 'cursors': ['', '', ''], + \ 'colors' : ['white', 'cyan'], + \ 'widgets': [], + \ 'clipregs':['+"p', '"+'], + \}, get(g:, 'focau', {})) + + call focau#init#main() +endif + " Code taken from https://github.com/tpope/vim-sensible " and (mostly comments) from https://github.com/sheerun/vimrc " @@ -74,7 +90,7 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensible') == - if match(capture, 'checktime') == -1 augroup polyglot-sensible au! - au CursorHold * silent! checktime + au CursorHold,FocusGained * silent! checktime augroup END endif |