Skip to content

Commit f3983f4

Browse files
committed
Fix mouse mappings
The original mouse mapping didn't work well, because when I clicked on a word, Vim thought that the tag was only the part of the word from the position of the mouse pointer to the end of the word. E.g. if I clicked on the letter "c" of "function", it wanted to jump to the "ction" tag.
1 parent 162b8d1 commit f3983f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/vim-erlang-tags.vim

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ endfunction
6565

6666
function! VimErlangTagsDefineMappings()
6767
nnoremap <buffer> <c-]> :call VimErlangTagsSelect(0)<cr><c-]>
68-
nnoremap <buffer> g<LeftMouse> :call VimErlangTagsSelect(0)<cr>g<LeftMouse>
69-
nnoremap <buffer> <c-LeftMouse> :call VimErlangTagsSelect(0)<cr><c-LeftMouse>
68+
nnoremap <buffer> g<LeftMouse> :call VimErlangTagsSelect(0)<cr><c-]>
69+
nnoremap <buffer> <c-LeftMouse> :call VimErlangTagsSelect(0)<cr><c-]>
7070
nnoremap <buffer> g] :call VimErlangTagsSelect(0)<cr>g]
7171
nnoremap <buffer> g<c-]> :call VimErlangTagsSelect(0)<cr>g<c-]>
7272
nnoremap <buffer> <c-w><c-]> :call VimErlangTagsSelect(1)<cr><c-]>

0 commit comments

Comments
 (0)