Hi

I am writting python debugger plugin which will use a lot of  keys. So question:

How can I assign default shortcuts to actions like toggle breakpoint,
next command etc
so user will not have to assign a lot of keys himself.

Also please add sci_set_marker_at_line and sci_is_marker_set_at_line
to plugin API.  I will need them to show breakpoints and current line
when debugging.

patch is attached

-- 
Best regards,
Yury Siamashka
diff --git a/plugins/geanyfunctions.h b/plugins/geanyfunctions.h
index 234961c..288690f 100644
--- a/plugins/geanyfunctions.h
+++ b/plugins/geanyfunctions.h
@@ -168,6 +168,10 @@
 	geany_functions->p_sci->set_target_end
 #define sci_replace_target \
 	geany_functions->p_sci->replace_target
+#define sci_set_marker_at_line \
+	geany_functions->p_sci->set_marker_at_line
+#define sci_is_marker_set_at_line \
+	geany_functions->p_sci->is_marker_set_at_line
 #define templates_get_template_fileheader \
 	geany_functions->p_templates->get_template_fileheader
 #define utils_str_equal \
diff --git a/src/plugindata.h b/src/plugindata.h
index 42fae7b..d2c0ed2 100644
--- a/src/plugindata.h
+++ b/src/plugindata.h
@@ -50,7 +50,7 @@
 enum {
 	/** The Application Programming Interface (API) version, incremented
 	 * whenever any plugin data types are modified or appended to. */
-	GEANY_API_VERSION = 155,
+	GEANY_API_VERSION = 156,
 
 	/** The Application Binary Interface (ABI) version, incremented whenever
 	 * existing fields in the plugin data types have to be changed or reordered. */
@@ -341,6 +341,8 @@ typedef struct SciFuncs
 	void (*set_target_start) (ScintillaObject *sci, gint start);
 	void (*set_target_end) (ScintillaObject *sci, gint end);
 	gint (*replace_target) (ScintillaObject *sci, const gchar *text, gboolean regex);
+	void (*set_marker_at_line) (ScintillaObject* sci, gint line_number, gboolean set, gint marker );
+	gboolean (*is_marker_set_at_line) (ScintillaObject* sci, gint line, gint marker);
 }
 SciFuncs;
 
diff --git a/src/plugins.c b/src/plugins.c
index 395b3fe..645b0ea 100644
--- a/src/plugins.c
+++ b/src/plugins.c
@@ -171,7 +171,9 @@ static SciFuncs sci_funcs = {
 	&sci_get_line_end_position,
 	&sci_set_target_start,
 	&sci_set_target_end,
-	&sci_replace_target
+	&sci_replace_target,
+	&sci_set_marker_at_line,
+	&sci_is_marker_set_at_line
 };
 
 static TemplateFuncs template_funcs = {
_______________________________________________
Geany-devel mailing list
[email protected]
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel

Reply via email to