diff --git a/bundle/vim-chat/autoload/chat/windows.vim b/bundle/vim-chat/autoload/chat/windows.vim index b18ef487c..6fa2aa8e8 100644 --- a/bundle/vim-chat/autoload/chat/windows.vim +++ b/bundle/vim-chat/autoload/chat/windows.vim @@ -115,10 +115,10 @@ function! chat#windows#open() abort call s:enter() elseif char ==# "\" let mouse_left_lnum = v:mouse_lnum - let mouse_left_col = v:mouse_col + let mouse_left_col = getmousepos().column elseif char ==# "\" || char ==# "\x80\xfd-" let mouse_left_release_lnum = v:mouse_lnum - let mouse_left_relsese_col = v:mouse_col + let mouse_left_relsese_col = getmousepos().column let selected_text = s:high_pso(mouse_left_lnum, mouse_left_col, mouse_left_release_lnum, mouse_left_relsese_col) elseif char ==# "\" " copy select text @@ -270,8 +270,8 @@ endfunction function! s:high_pso(l, c, rl, rc) abort let l = a:l let rl = a:rl - let c = strlen(strcharpart(getline(l), 0, a:c)) + 1 - let rc = strlen(strcharpart(getline(rl), 0, a:rc)) + 1 + let c = strlen(strpart(getline(l), 0, a:c)) + 1 + let rc = strlen(strpart(getline(rl), 0, a:rc)) + 1 call clearmatches() let selected_text = [] if l ==# rl && c == rc