Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse coordinates off by 1 in some terminals #23

Closed
zyedidia opened this issue Apr 18, 2016 · 2 comments
Closed

Mouse coordinates off by 1 in some terminals #23

zyedidia opened this issue Apr 18, 2016 · 2 comments
Labels

Comments

@zyedidia
Copy link
Owner

zyedidia commented Apr 18, 2016

In certain terminals, the a mouse click will put the mouse in the wrong position (off by 1 in both the x and y directions).

Most terminals report the mouse position incorrectly (off by 1) so I adjust for this, but other terminals actually report the coordinates correctly.

The terminals that I know of so far that report mouse coordinates properly are:

  • xfce4-terminal
  • Windows console

See #7, #16

@zyedidia
Copy link
Owner Author

zyedidia commented Apr 18, 2016

The issue here seems to be sgr mouse reporting vs legacy X11 mouse reporting. Sgr reports 1,1 as the top left corner, while X11 reports 0,0 as the top left corner. I've submitted a PR to tcell to use 0,0 as the top left corner in all cases. See gdamore/tcell#89.

@zyedidia
Copy link
Owner Author

The fix to tcell got merged so this is now fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant