"pressed" : [
"(n_press, x, y) => {",
"\tGtk.TextIter iter;",
- "\tint buffer_x, buffer_y;",
- "\t_this.view.el.window_to_buffer_coords (",
- "\t\tGtk.TextWindowType.TEXT, ",
- "\t\t(int)x, (int)y, out buffer_x, out buffer_y",
- "\t);",
- "\tGLib.debug(\"converted %d, %d to %d %d\", ",
- "\t\t(int)x, (int)y, buffer_x, buffer_y",
- "\t\t);",
+ "",
+ "\tvar gut = _this.view.el.get_gutter(Gtk.TextWindowType.TEXT);",
"\t",
+ "\t ",
"\t_this.view.el.get_iter_at_location (out iter, ",
- "\t\t\tbuffer_x, buffer_y);",
+ "\t\t\t(int)x - gut.get_width(), (int)y);",
"\tif (_this.buffer.el.iter_has_context_class(iter, \"comment\") ||",
"\t\t_this.buffer.el.iter_has_context_class(iter, \"string\")",
"\t) { ",
//listeners
this.el.pressed.connect( (n_press, x, y) => {
Gtk.TextIter iter;
- int buffer_x, buffer_y;
- _this.view.el.window_to_buffer_coords (
- Gtk.TextWindowType.TEXT,
- (int)x, (int)y, out buffer_x, out buffer_y
- );
- GLib.debug("converted %d, %d to %d %d",
- (int)x, (int)y, buffer_x, buffer_y
- );
+
+ var gut = _this.view.el.get_gutter(Gtk.TextWindowType.TEXT);
+
_this.view.el.get_iter_at_location (out iter,
- buffer_x, buffer_y);
+ (int)x - gut.get_width(), (int)y);
if (_this.buffer.el.iter_has_context_class(iter, "comment") ||
_this.buffer.el.iter_has_context_class(iter, "string")
) {