"pressed" : [
"(n_press, x, y) => {",
"\tGtk.TextIter iter;",
- "\t_this.view.el.get_iter_at_location (out iter, (int)x, (int)y);",
+ "\tint buffer_x, buffer_y;",
+ "\t_this.viewwindow_to_buffer_coords (",
+ "\t\t\tGtk.TextWindowTyp.TEXT, ",
+ "\t\t\t",
+ "\t\t\t(int)x, (int)y, out buffer_x, out buffer_y)",
+ "",
+ "\t_this.view.el.get_iter_at_location (out iter, buffer_x, buffer_x;",
"\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;
- _this.view.el.get_iter_at_location (out iter, (int)x, (int)y);
+ int buffer_x, buffer_y;
+ _this.viewwindow_to_buffer_coords (
+ Gtk.TextWindowTyp.TEXT,
+
+ (int)x, (int)y, out buffer_x, out buffer_y)
+
+ _this.view.el.get_iter_at_location (out iter, buffer_x, buffer_x;
if (_this.buffer.el.iter_has_context_class(iter, "comment") ||
_this.buffer.el.iter_has_context_class(iter, "string")
) {