improvements

This commit is contained in:
ManjaroOne666 2018-05-07 23:49:02 +01:00
parent 3352af16d3
commit 756f9ee97b
2 changed files with 7 additions and 16 deletions

View File

@ -47,16 +47,16 @@ if exists('+showtabline')
let l:file = "''"
endif
let l:customtabline .= l:file . ' %#mNoise# '
let l:customtabline .= l:file . ' %#TabLineNoise# '
let l:tabnumber = l:tabnumber + 1
endwhile
let l:customtabline .= '%T%#TabLineFill#%='
let l:customtabline .= '%#mNoise# '
let l:customtabline .= '%#TabLineNoise# '
let l:customtabline .= '%#TabSeparator# "%#TabLineItemSel#%{v:register}%#TabSeparator#" '
let l:customtabline .= '%#mNoise# '
let l:customtabline .= '%#TabLineNoise# '
let l:customtabline .= "%#TabLineItemSel# %{ObsessionStatus(fnamemodify(v:this_session,':t'),'---')} %*"
return l:customtabline

View File

@ -1,4 +1,5 @@
function! SetColor(name, fg, bg, fg_l, bg_l, style) abort
"{{{
if &background ==? 'dark'
if a:fg ==? 'normal'
let l:guifg = ' guifg=' . g:d_normal_fg
@ -77,7 +78,7 @@ function! SetColor(name, fg, bg, fg_l, bg_l, style) abort
execute 'hi clear ' . a:name
execute l:histring
endfunction
endfunction"}}}
" TODO better name
function! GetStatusFrag(condition, colorname, conditionprefix, text) abort
@ -150,18 +151,8 @@ endfunction
function! GetLinterStatus(key) abort
let l:linter = ale#statusline#Count(bufnr(''))"{{{
return l:linter[a:key]
endfunction
"}}}
" old linter status function
function! LinterStatus() abort
let l:counts = ale#statusline#Count(bufnr(''))"{{{
let l:all_errors = l:counts.error + l:counts.style_error
let l:all_non_errors = l:counts.total - l:all_errors
return l:counts.total == 0 ? 'OK' : printf('%dW %dE', l:all_non_errors, l:all_errors)
" return l:linter[a:key]
return 3
endfunction
"}}}