"pressed" : [
"(n_press, x, y) => {",
"\tGtk.TextIter iter;",
- "",
+ "\tint buffer_x, buffer_y;",
"\tvar gut = _this.view.el.get_gutter(Gtk.TextWindowType.LEFT);",
"\t",
- "\t ",
+ "\t _this.view.el.window_to_buffer_coords (Gtk.TextWindowType.TEXT,",
+ "\t\t (int)x - gut.get_width(), (int)y,",
+ "\t out buffer_x, out buffer_y);",
"\t_this.view.el.get_iter_at_location (out iter, ",
- "\t\t\t(int)x - gut.get_width(), (int)y);",
+ "\t\t\tbuffer_x, buffer_y);;",
+ "\t",
+ "\t",
"\tif (_this.buffer.el.iter_has_context_class(iter, \"comment\") ||",
"\t\t_this.buffer.el.iter_has_context_class(iter, \"string\")",
"\t) { ",
"\t\t\t",
"\t\t});",
"\t\t",
+ "\t\t/*",
+ "\t\t\tthings that can ber returned..",
+ "\t\t\t\"int\" (type only)",
+ "\t\t\tprivae void ..",
+ "\t\t\tEditor xxxx._this",
+ "\t\t\t. ",
+ "\t\t*/",
+ "\t\t",
"\t\t // could never get this to work anywhere..",
"\t\t // looks like its probably for calling stuff..",
"\t\t // but always returns null..",
//listeners
this.el.pressed.connect( (n_press, x, y) => {
Gtk.TextIter iter;
-
+ int buffer_x, buffer_y;
var gut = _this.view.el.get_gutter(Gtk.TextWindowType.LEFT);
-
+ _this.view.el.window_to_buffer_coords (Gtk.TextWindowType.TEXT,
+ (int)x - gut.get_width(), (int)y,
+ out buffer_x, out buffer_y);
_this.view.el.get_iter_at_location (out iter,
- (int)x - gut.get_width(), (int)y);
+ buffer_x, buffer_y);;
+
+
if (_this.buffer.el.iter_has_context_class(iter, "comment") ||
_this.buffer.el.iter_has_context_class(iter, "string")
) {
});
+ /*
+ things that can ber returned..
+ "int" (type only)
+ privae void ..
+ Editor xxxx._this
+ .
+ */
+
// could never get this to work anywhere..
// looks like its probably for calling stuff..
// but always returns null..