From 8621b5b2d35af51e74144a50c0ad3a01b505e2c8 Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Mon, 9 May 2022 12:03:00 +0800 Subject: [PATCH] fix(chat): display username instead --- bundle/vim-chat/autoload/chat/windows.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bundle/vim-chat/autoload/chat/windows.vim b/bundle/vim-chat/autoload/chat/windows.vim index a7eaabddb..07fb57167 100644 --- a/bundle/vim-chat/autoload/chat/windows.vim +++ b/bundle/vim-chat/autoload/chat/windows.vim @@ -380,7 +380,7 @@ function! s:update_msg_screen() abort let msgs = filter(deepcopy(s:messages), '(!empty(v:val["room"]) && v:val["room"] ==# s:current_channel) ||' \ . ' (empty(v:val["room"]) && has_key(v:val, "protocol") && v:val["protocol"] ==# s:protocol)') for msg in msgs - let name = s:get_str_with_width(msg['user'], 13) + let name = s:get_str_with_width(msg['username'], 13) let message = s:get_lines_with_width(msg['msg'], winwidth('$') - 36) let first_line = '[' . msg['time'] . '] ' . nr2char(9474) . repeat(' ', 13 - strwidth(name)) . name . ' ' . nr2char(9474) . ' ' . message[0] call add(buffer, first_line)