mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-03-12 17:55:41 +08:00
fix(chat): fix next/previous channel
This commit is contained in:
parent
2fc1389cce
commit
3bff3f833d
@ -334,7 +334,7 @@ function! s:previous_channel() abort
|
||||
if !empty(s:protocol) && has_key(s:opened_channels, s:protocol) && index(s:opened_channels[s:protocol], s:current_channel) !=# -1
|
||||
let index = index(s:opened_channels[s:protocol], s:current_channel)
|
||||
let index -=1
|
||||
let s:current_channel = s:current_channel[s:protocol][index]
|
||||
let s:current_channel = s:opened_channels[s:protocol][index]
|
||||
call chat#{s:protocol}#enter_room(s:current_channel)
|
||||
call s:update_msg_screen()
|
||||
call s:update_statusline()
|
||||
@ -348,7 +348,7 @@ function! s:next_channel() abort
|
||||
if index ==# len(s:opened_channels[s:protocol])
|
||||
let index = 0
|
||||
endif
|
||||
let s:current_channel = s:current_channel[s:protocol][index]
|
||||
let s:current_channel = s:opened_channels[s:protocol][index]
|
||||
call chat#{s:protocol}#enter_room(s:current_channel)
|
||||
call s:update_msg_screen()
|
||||
call s:update_statusline()
|
||||
|
Loading…
x
Reference in New Issue
Block a user