From 468ca152fd706c2910f11c89cd7dba9889b20d16 Mon Sep 17 00:00:00 2001 From: itchyny Date: Wed, 29 Jan 2020 21:26:55 +0900 Subject: [PATCH] stop listening CursorMoved, BufUnload and remove lightline#update_once --- autoload/lightline.vim | 10 +--------- plugin/lightline.vim | 3 +-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/autoload/lightline.vim b/autoload/lightline.vim index 07800f4..5ea984a 100644 --- a/autoload/lightline.vim +++ b/autoload/lightline.vim @@ -2,7 +2,7 @@ " Filename: autoload/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2020/01/27 19:41:58. +" Last Change: 2020/01/29 21:00:00. " ============================================================================= let s:save_cpo = &cpo @@ -24,16 +24,9 @@ function! lightline#update() abort let s = winnr('$') == 1 && w > 0 ? [lightline#statusline(0)] : [lightline#statusline(0), lightline#statusline(1)] for n in range(1, winnr('$')) call setwinvar(n, '&statusline', s[n!=w]) - call setwinvar(n, 'lightline', n!=w) endfor endfunction -function! lightline#update_once() abort - if !exists('w:lightline') || w:lightline - call lightline#update() - endif -endfunction - function! lightline#update_disable() abort if !s:lightline.enable.statusline return @@ -53,7 +46,6 @@ function! lightline#enable() abort autocmd SessionLoadPost * call lightline#highlight() autocmd ColorScheme * if !has('vim_starting') || expand('') !=# 'macvim' \ | call lightline#update() | call lightline#highlight() | endif - autocmd CursorMoved,BufUnload * call lightline#update_once() augroup END augroup lightline-disable autocmd! diff --git a/plugin/lightline.vim b/plugin/lightline.vim index d08517d..f48c043 100644 --- a/plugin/lightline.vim +++ b/plugin/lightline.vim @@ -2,7 +2,7 @@ " Filename: plugin/lightline.vim " Author: itchyny " License: MIT License -" Last Change: 2019/07/30 12:00:00. +" Last Change: 2020/01/29 21:00:00. " ============================================================================= if exists('g:loaded_lightline') || v:version < 700 @@ -22,7 +22,6 @@ augroup lightline autocmd SessionLoadPost * call lightline#highlight() autocmd ColorScheme * if !has('vim_starting') || expand('') !=# 'macvim' \ | call lightline#update() | call lightline#highlight() | endif - autocmd CursorMoved,BufUnload * call lightline#update_once() augroup END " This quickfix option was introduced at Vim 85850f3a5ef9, which is the commit