Skip to content

Commit

Permalink
Merge pull request #1 from onodera-punpun/urxvt_fixes
Browse files Browse the repository at this point in the history
Fix scroll evenets getting interpeted ass button1/2 events (zyedidia/micro#131)
  • Loading branch information
zyedidia committed May 22, 2016
2 parents 4882414 + 9fcf6e0 commit efb81d0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tscreen.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,11 +856,15 @@ func (t *tScreen) postMouseEvent(x, y, btn int) {
// button press events unless we see an intervening release event.
switch btn & 0x43 {
case 0:
button = Button1
t.wasbtn = true
if t.wasbtn {
button = Button1
t.wasbtn = true
}
case 1:
button = Button2
t.wasbtn = true
if t.wasbtn {
button = Button2
t.wasbtn = true
}
case 2:
button = Button3
t.wasbtn = true
Expand Down

0 comments on commit efb81d0

Please sign in to comment.