diff --git a/autoload/SpaceVim/layers/core/statusline.vim b/autoload/SpaceVim/layers/core/statusline.vim index 99fa101a0..39c1beba9 100644 --- a/autoload/SpaceVim/layers/core/statusline.vim +++ b/autoload/SpaceVim/layers/core/statusline.vim @@ -448,9 +448,9 @@ function! SpaceVim#layers#core#statusline#get(...) abort return st elseif &filetype ==# 'vimchat' return '%#SpaceVim_statusline_ia#' . s:winnr(1) . '%#SpaceVim_statusline_ia_SpaceVim_statusline_b#' . s:lsep - \ . '%#SpaceVim_statusline_b# Chat %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep . ' ' + \ . '%#SpaceVim_statusline_b# Chat %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep \ . '%#SpaceVim_statusline_c# ' - \ . '%{chat#windows#status().protocol}' . ' %#SpaceVim_statusline_c_SpaceVim_statusline_b#' . s:lsep . ' ' + \ . '%{chat#windows#status().protocol}' . ' %#SpaceVim_statusline_c_SpaceVim_statusline_b#' . s:lsep \ . '%#SpaceVim_statusline_b# ' \ . '%{chat#windows#status().channel}' . ' %#SpaceVim_statusline_b_SpaceVim_statusline_c#' . s:lsep elseif &filetype ==# 'git-status' diff --git a/bundle/vim-chat/autoload/chat/gitter.vim b/bundle/vim-chat/autoload/chat/gitter.vim index 3cb6adf02..e1a605ee9 100644 --- a/bundle/vim-chat/autoload/chat/gitter.vim +++ b/bundle/vim-chat/autoload/chat/gitter.vim @@ -196,7 +196,9 @@ function! s:get_all_channels_stderr(id, data, event) abort endfunction function! s:get_all_channels_exit(id, data, event) abort call s:LOG.debug(a:data) - let s:channels = s:JSON.json_decode(join(s:list_all_channels_result, '')) + if a:data ==# 0 + let s:channels = s:JSON.json_decode(join(s:list_all_channels_result, '')) + endif endfunction function! Test(str) abort diff --git a/bundle/vim-chat/autoload/chat/windows.vim b/bundle/vim-chat/autoload/chat/windows.vim index caa99d86b..97e3a7697 100644 --- a/bundle/vim-chat/autoload/chat/windows.vim +++ b/bundle/vim-chat/autoload/chat/windows.vim @@ -362,7 +362,7 @@ function! s:complete(base,num) abort let channels = chat#{s:protocol}#get_channels() catch endtry - let rsl = filter(copy(channels), "v:val =~ '^' . matchstr(a:base, '\\w*$')") + let rsl = filter(copy(channels), "v:val =~? '^' . matchstr(a:base, '\\w*$')") if len(rsl) > 0 return matchstr(a:base, '^/set_channel\s*') . rsl[a:num % len(rsl)] endif