marijnh/CodeMirror — pull request #1766 by JosephPecoraro (2013-08-22 00:39:19+00:00)
Title: Add "gutterContextMenu" event to capture context menu events in gutters

In Web Inspector we use `gutterClick` to add/remove breakpoints. We would also like to also handle `contextmenu` events in the gutter, with the same information that gutterClick gets (lineNumber, gutterClass, event).

This would let us do a couple of things that would be harder / error prone otherwise:

* Adding a breakpoint / widget by right clicking the gutter, with the real contextmenu event

![add-breakpoint](https://f.cloud.github.com/assets/11351/1005670/4fe71ac0-0ac2-11e3-8d6d-8462d0150a0b.png)

* Shared code path for contextmenu when gutter items do exist no matter the widget

![edit-breakpoint](https://f.cloud.github.com/assets/11351/1005671/5020830a-0ac2-11e3-94a8-3bd8e1eefbc3.png)