mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-02-09 10:40:04 +08:00
fix(vimchat): fix windows flickr
This commit is contained in:
parent
992ffadef3
commit
7b85550ac8
@ -379,26 +379,25 @@ function! s:enter() abort
|
|||||||
let s:c_begin = ''
|
let s:c_begin = ''
|
||||||
return
|
return
|
||||||
elseif s:c_begin . s:c_char . s:c_end =~# '/set_protocol\s*'
|
elseif s:c_begin . s:c_char . s:c_end =~# '/set_protocol\s*'
|
||||||
let saved_protocal = s:protocol
|
let protocol = matchstr(s:c_begin . s:c_char . s:c_end, '/set_protocol\s*\zs\S*')
|
||||||
let s:protocol = matchstr(s:c_begin . s:c_char . s:c_end, '/set_protocol\s*\zs\S*')
|
|
||||||
let s:c_end = ''
|
let s:c_end = ''
|
||||||
let s:c_char = ''
|
let s:c_char = ''
|
||||||
let s:c_begin = ''
|
let s:c_begin = ''
|
||||||
try
|
try
|
||||||
call chat#{s:protocol}#get_channels()
|
call chat#{protocol}#get_channels()
|
||||||
if !has_key(s:opened_channels, s:protocol)
|
if !has_key(s:opened_channels, protocol)
|
||||||
let s:opened_channels[s:protocol] = []
|
let s:opened_channels[protocol] = []
|
||||||
endif
|
endif
|
||||||
|
let s:protocol = protocol
|
||||||
catch
|
catch
|
||||||
call chat#windows#push({
|
call chat#windows#push({
|
||||||
\ 'user' : '--->',
|
\ 'user' : '--->',
|
||||||
\ 'username' : '--->',
|
\ 'username' : '--->',
|
||||||
\ 'room' : '',
|
\ 'room' : '',
|
||||||
\ 'protocol' : s:protocol,
|
\ 'protocol' : s:protocol,
|
||||||
\ 'msg' : 'protocal does not exists: ' . s:current_channel,
|
\ 'msg' : 'protocal does not exists: ' . protocol,
|
||||||
\ 'time': strftime("%Y-%m-%d %H:%M"),
|
\ 'time': strftime("%Y-%m-%d %H:%M"),
|
||||||
\ })
|
\ })
|
||||||
let s:protocol = saved_protocal
|
|
||||||
endtry
|
endtry
|
||||||
call s:update_msg_screen()
|
call s:update_msg_screen()
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user