From 87940629f70259c76a79e6e6cc2fe4d4df7e9a2f Mon Sep 17 00:00:00 2001 From: itchyny Date: Mon, 16 Sep 2013 20:44:23 +0900 Subject: [PATCH] s/winwidth('.')/winwidth(0)/g --- README.md | 16 ++++++++-------- doc/lightline.txt | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a0f5ecf..e502212 100644 --- a/README.md +++ b/README.md @@ -574,19 +574,19 @@ function! MyFugitive() endfunction function! MyFileformat() - return winwidth('.') > 70 ? &fileformat : '' + return winwidth(0) > 70 ? &fileformat : '' endfunction function! MyFiletype() - return winwidth('.') > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' + return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' endfunction function! MyFileencoding() - return winwidth('.') > 70 ? (strlen(&fenc) ? &fenc : &enc) : '' + return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : '' endfunction function! MyMode() - return winwidth('.') > 60 ? lightline#mode() : '' + return winwidth(0) > 60 ? lightline#mode() : '' endfunction ``` When the current window width is narrow, the mode component and the file information component collapse. @@ -671,15 +671,15 @@ function! MyFugitive() endfunction function! MyFileformat() - return winwidth('.') > 70 ? &fileformat : '' + return winwidth(0) > 70 ? &fileformat : '' endfunction function! MyFiletype() - return winwidth('.') > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' + return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' endfunction function! MyFileencoding() - return winwidth('.') > 70 ? (strlen(&fenc) ? &fenc : &enc) : '' + return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : '' endfunction function! MyMode() @@ -692,7 +692,7 @@ function! MyMode() \ &ft == 'unite' ? 'Unite' : \ &ft == 'vimfiler' ? 'VimFiler' : \ &ft == 'vimshell' ? 'VimShell' : - \ winwidth('.') > 60 ? lightline#mode() : '' + \ winwidth(0) > 60 ? lightline#mode() : '' endfunction function! CtrlPMark() diff --git a/doc/lightline.txt b/doc/lightline.txt index 9a4a926..f7b6d36 100644 --- a/doc/lightline.txt +++ b/doc/lightline.txt @@ -692,15 +692,15 @@ For users who uses lots of plugins: endfunction function! MyFileformat() - return winwidth('.') > 70 ? &fileformat : '' + return winwidth(0) > 70 ? &fileformat : '' endfunction function! MyFiletype() - return winwidth('.') > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' + return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' endfunction function! MyFileencoding() - return winwidth('.') > 70 ? (strlen(&fenc) ? &fenc : &enc) : '' + return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : '' endfunction function! MyMode() @@ -713,7 +713,7 @@ For users who uses lots of plugins: \ &ft == 'unite' ? 'Unite' : \ &ft == 'vimfiler' ? 'VimFiler' : \ &ft == 'vimshell' ? 'VimShell' : - \ winwidth('.') > 60 ? lightline#mode() : '' + \ winwidth(0) > 60 ? lightline#mode() : '' endfunction function! CtrlPMark()