Add sci_goto_line() to the plugin API.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4363 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
8d2a258b94
commit
d7e8d98649
@ -10,7 +10,8 @@
|
|||||||
* src/sidebar.c:
|
* src/sidebar.c:
|
||||||
Rename "select" variables into "selection" to avoid shadowed names.
|
Rename "select" variables into "selection" to avoid shadowed names.
|
||||||
* plugins/geanyfunctions.h, src/plugins.c, src/plugindata.h:
|
* plugins/geanyfunctions.h, src/plugins.c, src/plugindata.h:
|
||||||
Add ui_widget_modify_font_from_string() to the plugin API.
|
Add ui_widget_modify_font_from_string() and sci_goto_line()
|
||||||
|
to the plugin API.
|
||||||
* plugins/filebrowser.c:
|
* plugins/filebrowser.c:
|
||||||
Rename "select" variables into "selection" to avoid shadowed names.
|
Rename "select" variables into "selection" to avoid shadowed names.
|
||||||
Make use of ui_widget_modify_font_from_string().
|
Make use of ui_widget_modify_font_from_string().
|
||||||
|
|||||||
@ -178,6 +178,8 @@
|
|||||||
geany_functions->p_sci->delete_marker_at_line
|
geany_functions->p_sci->delete_marker_at_line
|
||||||
#define sci_is_marker_set_at_line \
|
#define sci_is_marker_set_at_line \
|
||||||
geany_functions->p_sci->is_marker_set_at_line
|
geany_functions->p_sci->is_marker_set_at_line
|
||||||
|
#define sci_goto_line \
|
||||||
|
geany_functions->p_sci->goto_line
|
||||||
#define templates_get_template_fileheader \
|
#define templates_get_template_fileheader \
|
||||||
geany_functions->p_templates->get_template_fileheader
|
geany_functions->p_templates->get_template_fileheader
|
||||||
#define utils_str_equal \
|
#define utils_str_equal \
|
||||||
|
|||||||
@ -50,7 +50,7 @@
|
|||||||
enum {
|
enum {
|
||||||
/** The Application Programming Interface (API) version, incremented
|
/** The Application Programming Interface (API) version, incremented
|
||||||
* whenever any plugin data types are modified or appended to. */
|
* whenever any plugin data types are modified or appended to. */
|
||||||
GEANY_API_VERSION = 163,
|
GEANY_API_VERSION = 164,
|
||||||
|
|
||||||
/** The Application Binary Interface (ABI) version, incremented whenever
|
/** The Application Binary Interface (ABI) version, incremented whenever
|
||||||
* existing fields in the plugin data types have to be changed or reordered. */
|
* existing fields in the plugin data types have to be changed or reordered. */
|
||||||
@ -345,6 +345,7 @@ typedef struct SciFuncs
|
|||||||
void (*set_marker_at_line) (struct _ScintillaObject *sci, gint line_number, gint marker);
|
void (*set_marker_at_line) (struct _ScintillaObject *sci, gint line_number, gint marker);
|
||||||
void (*delete_marker_at_line) (struct _ScintillaObject *sci, gint line_number, gint marker);
|
void (*delete_marker_at_line) (struct _ScintillaObject *sci, gint line_number, gint marker);
|
||||||
gboolean (*is_marker_set_at_line) (struct _ScintillaObject *sci, gint line, gint marker);
|
gboolean (*is_marker_set_at_line) (struct _ScintillaObject *sci, gint line, gint marker);
|
||||||
|
void (*goto_line) (struct _ScintillaObject *sci, gint line, gboolean unfold);
|
||||||
}
|
}
|
||||||
SciFuncs;
|
SciFuncs;
|
||||||
|
|
||||||
|
|||||||
@ -176,7 +176,8 @@ static SciFuncs sci_funcs = {
|
|||||||
&sci_replace_target,
|
&sci_replace_target,
|
||||||
&sci_set_marker_at_line,
|
&sci_set_marker_at_line,
|
||||||
&sci_delete_marker_at_line,
|
&sci_delete_marker_at_line,
|
||||||
&sci_is_marker_set_at_line
|
&sci_is_marker_set_at_line,
|
||||||
|
&sci_goto_line
|
||||||
};
|
};
|
||||||
|
|
||||||
static TemplateFuncs template_funcs = {
|
static TemplateFuncs template_funcs = {
|
||||||
|
|||||||
@ -809,6 +809,13 @@ void sci_set_font(ScintillaObject *sci, gint style, const gchar *font, gint size
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** Jump to the specified line in the document.
|
||||||
|
* If @a unfold is set and @a line is hidden by a fold, it is unfolded
|
||||||
|
* first to ensure it is visible.
|
||||||
|
* @param sci Scintilla widget.
|
||||||
|
* @param line Line.
|
||||||
|
* @param unfold Whether to unfold first.
|
||||||
|
*/
|
||||||
void sci_goto_line(ScintillaObject *sci, gint line, gboolean unfold)
|
void sci_goto_line(ScintillaObject *sci, gint line, gboolean unfold)
|
||||||
{
|
{
|
||||||
if (unfold) SSM(sci, SCI_ENSUREVISIBLE, line, 0);
|
if (unfold) SSM(sci, SCI_ENSUREVISIBLE, line, 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user