Friday, January 31, 2014

Capturing Raw Mousepresses Past Column 192

I have the following to capture raw mousepresses:

nno <silent> <esc>[ :call PrintCoordinates()<cr>

fun! PrintCoordinates()
let k=[getchar(0),getchar(0),getchar(0),getchar(0),getchar(0)]
ec k
endfun

I don't know if there is an easier way, like some sort of options setting to get vim to pass on the raw mouse codes? Anyways, everything up to column 192 works as expected, I get [77,35,191,59,0], say, but past 192, I only get the column value, the row value goes to 0. Ie, [77,35,193,0,0].

When actually clicking and the mouse presses register all the way up to column 223, as expected.

By the way, I have ttymouse=xterm2 and I'm using mintty and cygwin.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment