geany  1.38
About: Geany is a text editor (using GTK2) with basic features of an integrated development environment (syntax highlighting, code folding, symbol name auto-completion, ...). F: office T: editor programming GTK+ IDE
  Fossies Dox: geany-1.38.tar.bz2  ("unofficial" and yet experimental doxygen-generated source code documentation)  

editor.c File Reference
#include "editor.h"
#include "app.h"
#include "callbacks.h"
#include "dialogs.h"
#include "documentprivate.h"
#include "filetypesprivate.h"
#include "geanyobject.h"
#include "highlighting.h"
#include "keybindings.h"
#include "main.h"
#include "prefs.h"
#include "projectprivate.h"
#include "sciwrappers.h"
#include "support.h"
#include "symbols.h"
#include "templates.h"
#include "ui_utils.h"
#include "utils.h"
#include "SciLexer.h"
#include <ctype.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
Include dependency graph for editor.c:

Go to the source code of this file.

Classes

struct  SelectionRange
 

Macros

#define get_project_pref(id)    (app->project ? app->project->priv->id : editor_prefs.id)
 
#define IS_ASCII(c)   (((unsigned char)(c)) < 0x80)
 
#define CURSOR_PLACEHOLDER   "_" /* Would rather use … but not all docs are unicode */
 

Functions

static void on_new_line_added (GeanyEditor *editor)
 
static gboolean handle_xml (GeanyEditor *editor, gint pos, gchar ch)
 
static void insert_indent_after_line (GeanyEditor *editor, gint line)
 
static void auto_multiline (GeanyEditor *editor, gint pos)
 
static void auto_close_chars (ScintillaObject *sci, gint pos, gchar c)
 
static void close_block (GeanyEditor *editor, gint pos)
 
static void editor_highlight_braces (GeanyEditor *editor, gint cur_pos)
 
static void read_current_word (GeanyEditor *editor, gint pos, gchar *word, gsize wordlen, const gchar *wc, gboolean stem)
 
static gsize count_indent_size (GeanyEditor *editor, const gchar *base_indent)
 
static const gchar * snippets_find_completion_by_name (const gchar *type, const gchar *name)
 
static void snippets_make_replacements (GeanyEditor *editor, GString *pattern)
 
static GeanyFiletypeeditor_get_filetype_at_line (GeanyEditor *editor, gint line)
 
static gboolean sci_is_blank_line (ScintillaObject *sci, gint line)
 
void editor_snippets_free (void)
 
static void snippets_load (GKeyFile *sysconfig, GKeyFile *userconfig)
 
static gboolean on_snippet_keybinding_activate (gchar *key)
 
static void add_kb (GKeyFile *keyfile, const gchar *group, gchar **keys)
 
static void load_kb (GKeyFile *sysconfig, GKeyFile *userconfig)
 
void editor_snippets_init (void)
 
static gboolean on_editor_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer data)
 
static gboolean is_style_php (gint style)
 
static gint editor_get_long_line_type (void)
 
static gint editor_get_long_line_column (void)
 
static const GeanyEditorPrefsget_default_prefs (void)
 
const GeanyEditorPrefseditor_get_prefs (GeanyEditor *editor)
 
void editor_toggle_fold (GeanyEditor *editor, gint line, gint modifiers)
 
static void on_margin_click (GeanyEditor *editor, SCNotification *nt)
 
static void on_update_ui (GeanyEditor *editor, G_GNUC_UNUSED SCNotification *nt)
 
static void check_line_breaking (GeanyEditor *editor, gint pos)
 
static void show_autocomplete (ScintillaObject *sci, gsize rootlen, GString *words)
 
static void show_tags_list (GeanyEditor *editor, const GPtrArray *tags, gsize rootlen)
 
static gboolean match_last_chars (ScintillaObject *sci, gint pos, const gchar *str)
 
static gboolean reshow_calltip (gpointer data)
 
static void request_reshowing_calltip (SCNotification *nt)
 
static gboolean autocomplete_scope (GeanyEditor *editor, const gchar *root, gsize rootlen)
 
static void on_char_added (GeanyEditor *editor, SCNotification *nt)
 
static void expand (ScintillaObject *sci, gint *line, gboolean doExpand, gboolean force, gint visLevels, gint level)
 
static void fold_changed (ScintillaObject *sci, gint line, gint levelNow, gint levelPrev)
 
static void ensure_range_visible (ScintillaObject *sci, gint posStart, gint posEnd, gboolean enforcePolicy)
 
static void auto_update_margin_width (GeanyEditor *editor)
 
static void partial_complete (ScintillaObject *sci, const gchar *text)
 
static gboolean check_partial_completion (GeanyEditor *editor, const gchar *entry)
 
void editor_sci_notify_cb (G_GNUC_UNUSED GtkWidget *widget, G_GNUC_UNUSED gint scn, gpointer scnt, gpointer data)
 
static void update_margins (ScintillaObject *sci)
 
static gboolean on_editor_notify (G_GNUC_UNUSED GObject *object, GeanyEditor *editor, SCNotification *nt, G_GNUC_UNUSED gpointer data)
 
static gint get_tab_width (const GeanyIndentPrefs *indent_prefs)
 
static gchar * get_whitespace (const GeanyIndentPrefs *iprefs, gint width)
 
static const GeanyIndentPrefsget_default_indent_prefs (void)
 
const GeanyIndentPrefseditor_get_indent_prefs (GeanyEditor *editor)
 Gets the indentation prefs for the editor. More...
 
static gboolean lexer_has_braces (ScintillaObject *sci)
 
static void read_indent (GeanyEditor *editor, gint pos)
 
static gint get_brace_indent (ScintillaObject *sci, gint line)
 
static gint get_sci_line_code_end_position (ScintillaObject *sci, gint line)
 
static gint get_python_indent (ScintillaObject *sci, gint line)
 
static gint get_xml_indent (ScintillaObject *sci, gint line)
 
static gint get_indent_size_after_line (GeanyEditor *editor, gint line)
 
static gint brace_match (ScintillaObject *sci, gint pos)
 
void editor_find_current_word (GeanyEditor *editor, gint pos, gchar *word, gsize wordlen, const gchar *wc)
 
void editor_find_current_word_sciwc (GeanyEditor *editor, gint pos, gchar *word, gsize wordlen)
 
gchar * editor_get_word_at_pos (GeanyEditor *editor, gint pos, const gchar *wordchars)
 Finds the word at the position specified by pos. More...
 
static const gchar * editor_read_word_stem (GeanyEditor *editor, gint pos, const gchar *wordchars)
 
static gint find_previous_brace (ScintillaObject *sci, gint pos)
 
static gint find_start_bracket (ScintillaObject *sci, gint pos)
 
static gboolean append_calltip (GString *str, const TMTag *tag, GeanyFiletypeID ft_id)
 
static gchar * find_calltip (const gchar *word, GeanyFiletype *ft)
 
gboolean editor_show_calltip (GeanyEditor *editor, gint pos)
 
gchar * editor_get_calltip_text (GeanyEditor *editor, const TMTag *tag)
 
static gboolean autocomplete_tags (GeanyEditor *editor, GeanyFiletype *ft, const gchar *root, gsize rootlen)
 
static gboolean autocomplete_check_html (GeanyEditor *editor, gint style, gint pos)
 
static GSList * get_doc_words (ScintillaObject *sci, gchar *root, gsize rootlen)
 
static gboolean autocomplete_doc_word (GeanyEditor *editor, gchar *root, gsize rootlen)
 
gboolean editor_start_auto_complete (GeanyEditor *editor, gint pos, gboolean force)
 
static void snippets_replace_specials (gpointer key, gpointer value, gpointer user_data)
 
static void fix_indentation (GeanyEditor *editor, GString *buf)
 
static GSList * replace_cursor_markers (GeanyEditor *editor, GString *template, gboolean indicator_for_first)
 
void editor_insert_text_block (GeanyEditor *editor, const gchar *text, gint insert_pos, gint cursor_index, gint newline_indent_size, gboolean replace_newlines)
 Inserts text, replacing \t tab chars (0x9) and \n newline chars (0xA) accordingly for the document. More...
 
static gboolean find_next_snippet_indicator (GeanyEditor *editor, SelectionRange *sel)
 
gboolean editor_goto_next_snippet_cursor (GeanyEditor *editor)
 
static gboolean snippets_complete_constructs (GeanyEditor *editor, gint pos, const gchar *word)
 
static gboolean at_eol (ScintillaObject *sci, gint pos)
 
gboolean editor_complete_snippet (GeanyEditor *editor, gint pos)
 
static void insert_closing_tag (GeanyEditor *editor, gint pos, gchar ch, const gchar *tag_name)
 
static void real_comment_multiline (GeanyEditor *editor, gint line_start, gint last_line)
 
static gint find_in_current_style (ScintillaObject *sci, const gchar *text, gboolean backwards)
 
static void sci_delete_line (ScintillaObject *sci, gint line)
 
static gboolean real_uncomment_multiline (GeanyEditor *editor)
 
static gint get_multiline_comment_style (GeanyEditor *editor, gint line_start)
 
gint editor_do_uncomment (GeanyEditor *editor, gint line, gboolean toggle)
 
void editor_do_comment_toggle (GeanyEditor *editor)
 
gint editor_do_comment (GeanyEditor *editor, gint line, gboolean allow_empty_lines, gboolean toggle, gboolean single_comment)
 
static gboolean delay_match_brace (G_GNUC_UNUSED gpointer user_data)
 
static gboolean in_block_comment (gint lexer, gint style)
 
static gboolean is_comment_char (gchar c, gint lexer)
 
void editor_insert_multiline_comment (GeanyEditor *editor)
 
void editor_scroll_to_line (GeanyEditor *editor, gint line, gfloat percent_of_view)
 
void editor_insert_alternative_whitespace (GeanyEditor *editor)
 
void editor_select_word (GeanyEditor *editor)
 
void editor_select_lines (GeanyEditor *editor, gboolean extra_line)
 
static gint find_paragraph_stop (GeanyEditor *editor, gint line, gint direction)
 
void editor_select_paragraph (GeanyEditor *editor)
 
static gint find_block_stop (GeanyEditor *editor, gint line, gint direction)
 
void editor_select_indent_block (GeanyEditor *editor)
 
static void smart_line_indentation (GeanyEditor *editor, gint first_line, gint last_line)
 
void editor_smart_line_indentation (GeanyEditor *editor)
 
void editor_indentation_by_one_space (GeanyEditor *editor, gint pos, gboolean decrease)
 
void editor_finalize (void)
 
gchar * editor_get_default_selection (GeanyEditor *editor, gboolean use_current_word, const gchar *wordchars)
 
gboolean editor_line_in_view (GeanyEditor *editor, gint line)
 
void editor_display_current_line (GeanyEditor *editor, gfloat percent_of_view)
 
void editor_indicator_clear_errors (GeanyEditor *editor)
 
void editor_indicator_clear (GeanyEditor *editor, gint indic)
 Deletes all currently set indicators matching indic in the editor window. More...
 
void editor_indicator_set_on_line (GeanyEditor *editor, gint indic, gint line)
 Sets an indicator indic on line. More...
 
void editor_indicator_set_on_range (GeanyEditor *editor, gint indic, gint start, gint end)
 Sets an indicator on the range specified by start and end. More...
 
void editor_insert_color (GeanyEditor *editor, const gchar *colour)
 
gint editor_get_eol_char_mode (GeanyEditor *editor)
 Retrieves the end of line characters mode (LF, CR/LF, CR) in the given editor. More...
 
const gchar * editor_get_eol_char_name (GeanyEditor *editor)
 Retrieves the localized name (for displaying) of the used end of line characters (LF, CR/LF, CR) in the given editor. More...
 
gint editor_get_eol_char_len (GeanyEditor *editor)
 Retrieves the length of the used end of line characters (LF, CR/LF, CR) in the given editor. More...
 
const gchar * editor_get_eol_char (GeanyEditor *editor)
 Retrieves the used end of line characters (LF, CR/LF, CR) in the given editor. More...
 
static void fold_all (GeanyEditor *editor, gboolean want_fold)
 
void editor_unfold_all (GeanyEditor *editor)
 
void editor_fold_all (GeanyEditor *editor)
 
void editor_replace_tabs (GeanyEditor *editor, gboolean ignore_selection)
 
void editor_replace_spaces (GeanyEditor *editor, gboolean ignore_selection)
 
void editor_strip_line_trailing_spaces (GeanyEditor *editor, gint line)
 
void editor_strip_trailing_spaces (GeanyEditor *editor, gboolean ignore_selection)
 
void editor_ensure_final_newline (GeanyEditor *editor)
 
static void set_font (ScintillaObject *sci, const gchar *font)
 
void editor_set_font (GeanyEditor *editor, const gchar *font)
 
void editor_set_line_wrapping (GeanyEditor *editor, gboolean wrap)
 
void editor_set_indent_type (GeanyEditor *editor, GeanyIndentType type)
 Sets the indent type for editor. More...
 
void editor_set_indent_width (GeanyEditor *editor, gint width)
 Sets the indent width for editor. More...
 
void editor_set_indent (GeanyEditor *editor, GeanyIndentType type, gint width)
 
gboolean editor_goto_line (GeanyEditor *editor, gint line_no, gint offset)
 
gboolean editor_goto_pos (GeanyEditor *editor, gint pos, gboolean mark)
 Moves to position pos, switching to the document if necessary, setting a marker if mark is set. More...
 
static gboolean on_editor_scroll_event (GtkWidget *widget, GdkEventScroll *event, gpointer user_data)
 
static gboolean editor_check_colourise (GeanyEditor *editor)
 
static gboolean on_editor_focus_in (GtkWidget *widget, GdkEventFocus *event, gpointer user_data)
 
static gboolean on_editor_draw (GtkWidget *widget, cairo_t *cr, gpointer user_data)
 
static void setup_sci_keys (ScintillaObject *sci)
 
static gboolean register_named_icon (ScintillaObject *sci, guint id, const gchar *name)
 
static ScintillaObject * create_new_sci (GeanyEditor *editor)
 
ScintillaObject * editor_create_widget (GeanyEditor *editor)
 Creates a new Scintilla GtkWidget based on the settings for editor. More...
 
GeanyEditoreditor_create (GeanyDocument *doc)
 
void editor_destroy (GeanyEditor *editor)
 
static void on_document_save (GObject *obj, GeanyDocument *doc)
 
gboolean editor_complete_word_part (GeanyEditor *editor)
 
void editor_init (void)
 
void editor_set_indentation_guides (GeanyEditor *editor)
 
void editor_apply_update_prefs (GeanyEditor *editor)
 
static void change_tab_indentation (GeanyEditor *editor, gint line, gboolean increase)
 
static void editor_change_line_indent (GeanyEditor *editor, gint line, gboolean increase)
 
void editor_indent (GeanyEditor *editor, gboolean increase)
 
const gchar * editor_find_snippet (GeanyEditor *editor, const gchar *snippet_name)
 Gets snippet by name. More...
 
void editor_insert_snippet (GeanyEditor *editor, gint pos, const gchar *snippet)
 Replaces all special sequences in snippet and inserts it at pos. More...
 
static void * copy_ (void *src)
 
static void free_ (void *doc)
 
GType editor_get_type (void)
 
 G_DEFINE_BOXED_TYPE (GeanyEditor, editor, copy_, free_)
 

Variables

static GHashTable * snippet_hash = NULL
 
static GtkAccelGroup * snippet_accel_group = NULL
 
static gboolean autocomplete_scope_shown = FALSE
 
static const gchar geany_cursor_marker [] = "__GEANY_CURSOR_MARKER__"
 
static gchar current_word [192]
 
GeanyEditorPrefs editor_prefs
 
EditorInfo editor_info = {current_word, -1}
 
struct {
   gchar *   text
 
   gboolean   set
 
   gchar *   last_word
 
   guint   tag_index
 
   gint   pos
 
   ScintillaObject *   sci
 
calltip = {NULL, FALSE, NULL, 0, 0, NULL}
 
static gchar indent [100]
 
static gboolean brace_timeout_active = FALSE
 

Macro Definition Documentation

◆ CURSOR_PLACEHOLDER

#define CURSOR_PLACEHOLDER   "_" /* Would rather use … but not all docs are unicode */

Definition at line 2398 of file editor.c.

◆ get_project_pref

#define get_project_pref (   id)     (app->project ? app->project->priv->id : editor_prefs.id)

Definition at line 397 of file editor.c.

◆ IS_ASCII

#define IS_ASCII (   c)    (((unsigned char)(c)) < 0x80)

Definition at line 1681 of file editor.c.

Function Documentation

◆ add_kb()

static void add_kb ( GKeyFile *  keyfile,
const gchar *  group,
gchar **  keys 
)
static

Definition at line 212 of file editor.c.

References group, NULL, on_snippet_keybinding_activate(), and snippet_accel_group.

Referenced by load_kb().

◆ append_calltip()

static gboolean append_calltip ( GString *  str,
const TMTag tag,
GeanyFiletypeID  ft_id 
)
static

◆ at_eol()

static gboolean at_eol ( ScintillaObject *  sci,
gint  pos 
)
static

◆ auto_close_chars()

static void auto_close_chars ( ScintillaObject *  sci,
gint  pos,
gchar  c 
)
static

◆ auto_multiline()

◆ auto_update_margin_width()

static void auto_update_margin_width ( GeanyEditor editor)
static

◆ autocomplete_check_html()

◆ autocomplete_doc_word()

static gboolean autocomplete_doc_word ( GeanyEditor editor,
gchar *  root,
gsize  rootlen 
)
static

◆ autocomplete_scope()

◆ autocomplete_tags()

static gboolean autocomplete_tags ( GeanyEditor editor,
GeanyFiletype ft,
const gchar *  root,
gsize  rootlen 
)
static

◆ brace_match()

static gint brace_match ( ScintillaObject *  sci,
gint  pos 
)
static

◆ change_tab_indentation()

◆ check_line_breaking()

◆ check_partial_completion()

static gboolean check_partial_completion ( GeanyEditor editor,
const gchar *  entry 
)
static

◆ close_block()

◆ copy_()

static void * copy_ ( void *  src)
static

Definition at line 5349 of file editor.c.

◆ count_indent_size()

static gsize count_indent_size ( GeanyEditor editor,
const gchar *  base_indent 
)
static

Definition at line 2778 of file editor.c.

References count, ptr, GeanyEditor::sci, and sci_get_tab_width().

Referenced by editor_insert_text_block().

◆ create_new_sci()

◆ delay_match_brace()

◆ editor_apply_update_prefs()

void editor_apply_update_prefs ( GeanyEditor editor)

◆ editor_change_line_indent()

static void editor_change_line_indent ( GeanyEditor editor,
gint  line,
gboolean  increase 
)
static

◆ editor_check_colourise()

◆ editor_complete_snippet()

◆ editor_complete_word_part()

gboolean editor_complete_word_part ( GeanyEditor editor)

◆ editor_create()

◆ editor_create_widget()

ScintillaObject * editor_create_widget ( GeanyEditor editor)

Creates a new Scintilla GtkWidget based on the settings for editor.

Parameters
editorEditor settings.
Returns
(transfer: floating) The new widget.
Since
0.15

Definition at line 4984 of file editor.c.

References create_new_sci(), editor_apply_update_prefs(), GeanyInterfacePrefs::editor_font, editor_set_indent(), get_default_indent_prefs(), GeanyEditor::indent_type, GeanyEditor::indent_width, interface_prefs, sci, GeanyEditor::sci, set_font(), GeanyIndentPrefs::type, and GeanyIndentPrefs::width.

Referenced by begin_print(), editor_create(), and set_editor().

◆ editor_destroy()

void editor_destroy ( GeanyEditor editor)

Definition at line 5030 of file editor.c.

Referenced by remove_page().

◆ editor_display_current_line()

void editor_display_current_line ( GeanyEditor editor,
gfloat  percent_of_view 
)

◆ editor_do_comment()

◆ editor_do_comment_toggle()

◆ editor_do_uncomment()

◆ editor_ensure_final_newline()

void editor_ensure_final_newline ( GeanyEditor editor)

◆ editor_finalize()

void editor_finalize ( void  )

Definition at line 4046 of file editor.c.

References scintilla_release_resources().

Referenced by do_main_quit().

◆ editor_find_current_word()

void editor_find_current_word ( GeanyEditor editor,
gint  pos,
gchar *  word,
gsize  wordlen,
const gchar *  wc 
)

◆ editor_find_current_word_sciwc()

void editor_find_current_word_sciwc ( GeanyEditor editor,
gint  pos,
gchar *  word,
gsize  wordlen 
)

◆ editor_find_snippet()

const gchar * editor_find_snippet ( GeanyEditor editor,
const gchar *  snippet_name 
)

Gets snippet by name.

If editor is passed, returns a snippet specific to the document filetype. If editor is NULL, returns a snippet from the default set.

Parameters
editor Editor or NULL.
snippet_nameSnippet name.
Returns
snippet or NULL if it was not found. Must not be freed.

Definition at line 5322 of file editor.c.

References GeanyEditor::document, GeanyDocument::file_type, GeanyFiletype::name, NULL, and snippet_hash.

◆ editor_fold_all()

void editor_fold_all ( GeanyEditor editor)

Definition at line 4390 of file editor.c.

References fold_all().

Referenced by cb_func_document_action(), and on_menu_fold_all1_activate().

◆ editor_get_calltip_text()

gchar * editor_get_calltip_text ( GeanyEditor editor,
const TMTag tag 
)

◆ editor_get_default_selection()

◆ editor_get_eol_char()

const gchar * editor_get_eol_char ( GeanyEditor editor)

Retrieves the used end of line characters (LF, CR/LF, CR) in the given editor.

If editor is NULL, the default end of line characters are used. The returned value is either "\n", "\r\n" or "\r".

Parameters
editor The editor to operate on, or NULL to query the default value.
Returns
The end of line characters.
Since
0.19

Definition at line 4349 of file editor.c.

References GeanyFilePrefs::default_eol_character, file_prefs, NULL, GeanyEditor::sci, sci_get_eol_mode(), and utils_get_eol_char().

Referenced by editor_ensure_final_newline(), editor_insert_text_block(), real_comment_multiline(), and split_line().

◆ editor_get_eol_char_len()

gint editor_get_eol_char_len ( GeanyEditor editor)

Retrieves the length of the used end of line characters (LF, CR/LF, CR) in the given editor.

If editor is NULL, the default end of line characters are used. The returned value is 1 for CR and LF and 2 for CR/LF.

Parameters
editor The editor to operate on, or NULL to query the default value.
Returns
The length of the end of line characters.
Since
0.19

Definition at line 4323 of file editor.c.

References GeanyFilePrefs::default_eol_character, file_prefs, NULL, SC_EOL_CRLF, GeanyEditor::sci, and sci_get_eol_mode().

Referenced by document_replace_sel(), editor_do_comment(), editor_do_comment_toggle(), editor_do_uncomment(), editor_indentation_by_one_space(), and editor_smart_line_indentation().

◆ editor_get_eol_char_mode()

gint editor_get_eol_char_mode ( GeanyEditor editor)

Retrieves the end of line characters mode (LF, CR/LF, CR) in the given editor.

If editor is NULL, the default end of line characters are used.

Parameters
editor The editor to operate on, or NULL to query the default value.
Returns
The used end of line characters mode.
Since
0.20

Definition at line 4279 of file editor.c.

References GeanyFilePrefs::default_eol_character, file_prefs, NULL, GeanyEditor::sci, and sci_get_eol_mode().

Referenced by convert_eol_characters(), document_open_file_full(), document_redo(), and document_undo().

◆ editor_get_eol_char_name()

const gchar * editor_get_eol_char_name ( GeanyEditor editor)

Retrieves the localized name (for displaying) of the used end of line characters (LF, CR/LF, CR) in the given editor.

If editor is NULL, the default end of line characters are used.

Parameters
editor The editor to operate on, or NULL to query the default value.
Returns
The name of the end of line characters.
Since
0.19

Definition at line 4301 of file editor.c.

References GeanyFilePrefs::default_eol_character, file_prefs, NULL, GeanyEditor::sci, sci_get_eol_mode(), and utils_get_eol_name().

◆ editor_get_filetype_at_line()

◆ editor_get_indent_prefs()

const GeanyIndentPrefs * editor_get_indent_prefs ( GeanyEditor editor)

Gets the indentation prefs for the editor.

Prefs can be different according to project or document.

Warning
Always get a fresh result instead of keeping a pointer to it if the editor/project settings may have changed, or if this function has been called for a different editor.
Parameters
editor The editor, or NULL to get the default indent prefs.
Returns
The indent prefs.

Definition at line 1267 of file editor.c.

References GeanyEditor::auto_indent, GeanyIndentPrefs::auto_indent_mode, GEANY_AUTOINDENT_BASIC, GEANY_AUTOINDENT_NONE, get_default_indent_prefs(), GeanyEditor::indent_type, GeanyEditor::indent_width, NULL, GeanyIndentPrefs::type, and GeanyIndentPrefs::width.

Referenced by auto_multiline(), change_tab_indentation(), close_block(), create_statusbar_statistics(), detect_indent_width(), detect_tabs_and_spaces(), document_apply_indent_settings(), document_set_filetype(), editor_change_line_indent(), editor_get_prefs(), editor_insert_alternative_whitespace(), editor_set_indent(), fix_indentation(), get_default_prefs(), get_indent_size_after_line(), init_stash_prefs(), insert_indent_after_line(), and ui_document_show_hide().

◆ editor_get_long_line_column()

◆ editor_get_long_line_type()

◆ editor_get_prefs()

const GeanyEditorPrefs * editor_get_prefs ( GeanyEditor editor)

◆ editor_get_type()

GType editor_get_type ( void  )

◆ editor_get_word_at_pos()

gchar * editor_get_word_at_pos ( GeanyEditor editor,
gint  pos,
const gchar *  wordchars 
)

Finds the word at the position specified by pos.

If any word is found, it is returned. Otherwise NULL is returned. Additional wordchars can be specified to define what to consider as a word.

Parameters
editorThe editor to operate on.
posThe position where the word should be read from. May be -1 to use the current position.
wordcharsThe wordchars to separate words. wordchars mean all characters to count as part of a word. May be NULL to use the default wordchars, see GEANY_WORDCHARS.
Returns
A newly-allocated string containing the word at the given pos or NULL. Should be freed when no longer needed.
Since
0.16

Definition at line 1791 of file editor.c.

References GEANY_MAX_WORD_LENGTH, NULL, pos, read_current_word(), and wordchars.

Referenced by autocomplete_scope().

◆ editor_goto_line()

gboolean editor_goto_line ( GeanyEditor editor,
gint  line_no,
gint  offset 
)

◆ editor_goto_next_snippet_cursor()

gboolean editor_goto_next_snippet_cursor ( GeanyEditor editor)

◆ editor_goto_pos()

gboolean editor_goto_pos ( GeanyEditor editor,
gint  pos,
gboolean  mark 
)

Moves to position pos, switching to the document if necessary, setting a marker if mark is set.

Parameters
editorEditor.
posThe position.
markWhether to set a mark on the position.
Returns
TRUE if action has been performed, otherwise FALSE.
Since
0.20

Definition at line 4732 of file editor.c.

References GeanyEditor::document, document_show_tab(), line, pos, GeanyEditor::sci, sci_get_line_from_position(), sci_goto_pos(), sci_marker_delete_all(), sci_set_marker_at_line(), and GeanyEditor::scroll_percent.

Referenced by document_new_file(), document_open_file_full(), editor_goto_line(), goto_file_pos(), and navqueue_goto_line().

◆ editor_highlight_braces()

static void editor_highlight_braces ( GeanyEditor editor,
gint  cur_pos 
)
static

◆ editor_indent()

◆ editor_indentation_by_one_space()

◆ editor_indicator_clear()

void editor_indicator_clear ( GeanyEditor editor,
gint  indic 
)

Deletes all currently set indicators matching indic in the editor window.

Parameters
editorThe editor to operate on.
indicThe indicator number to clear, this is a value of GeanyIndicator.
Since
0.16

Definition at line 4149 of file editor.c.

References NULL, GeanyEditor::sci, sci_get_length(), sci_indicator_clear(), and sci_indicator_set().

Referenced by editor_indicator_clear_errors(), on_menu_remove_indicators1_activate(), on_remove_markers1_activate(), and search_mark_all().

◆ editor_indicator_clear_errors()

void editor_indicator_clear_errors ( GeanyEditor editor)

◆ editor_indicator_set_on_line()

void editor_indicator_set_on_line ( GeanyEditor editor,
gint  indic,
gint  line 
)

Sets an indicator indic on line.

Whitespace at the start and the end of the line is not marked.

Parameters
editorThe editor to operate on.
indicThe indicator number to use, this is a value of GeanyIndicator.
lineThe line number which should be marked.
Since
0.16

Definition at line 4175 of file editor.c.

References editor_indicator_set_on_range(), line, NULL, GeanyEditor::sci, sci_get_line(), sci_get_line_end_position(), and sci_get_position_from_line().

Referenced by goto_compiler_file_line(), and process_build_output_line().

◆ editor_indicator_set_on_range()

void editor_indicator_set_on_range ( GeanyEditor editor,
gint  indic,
gint  start,
gint  end 
)

Sets an indicator on the range specified by start and end.

No error checking or whitespace removal is performed, this should be done by the calling function if necessary.

Parameters
editorThe editor to operate on.
indicThe indicator number to use, this is a value of GeanyIndicator.
startThe starting position for the marker.
endThe ending position for the marker.
Since
0.16

Definition at line 4225 of file editor.c.

References NULL, GeanyEditor::sci, sci_indicator_fill(), and sci_indicator_set().

Referenced by editor_indicator_set_on_line(), editor_insert_text_block(), and search_mark_all().

◆ editor_init()

◆ editor_insert_alternative_whitespace()

◆ editor_insert_color()

◆ editor_insert_multiline_comment()

◆ editor_insert_snippet()

void editor_insert_snippet ( GeanyEditor editor,
gint  pos,
const gchar *  snippet 
)

Replaces all special sequences in snippet and inserts it at pos.

If you insert at the current position, consider calling sci_scroll_caret() after this function.

Parameters
editor.
pos.
snippet.

Definition at line 5339 of file editor.c.

References editor_insert_text_block(), pos, and snippets_make_replacements().

Referenced by on_snippet_keybinding_activate(), and snippets_complete_constructs().

◆ editor_insert_text_block()

void editor_insert_text_block ( GeanyEditor editor,
const gchar *  text,
gint  insert_pos,
gint  cursor_index,
gint  newline_indent_size,
gboolean  replace_newlines 
)

Inserts text, replacing \t tab chars (0x9) and \n newline chars (0xA) accordingly for the document.

  • Leading tabs are replaced with the correct indentation.
  • Non-leading tabs are replaced with spaces (except when using 'Tabs' indent type).
  • Newline chars are replaced with the correct line ending string. This is very useful for inserting code without having to handle the indent type yourself (Tabs & Spaces mode can be tricky).
    Parameters
    editorEditor.
    textIntended as e.g. "if (foo)\n\tbar();".
    insert_posDocument position to insert text at.
    cursor_indexIf >= 0, the index into text to place the cursor.
    newline_indent_sizeIndentation size (in spaces) to insert for each newline; use -1 to read the indent size from the line with insert_pos on it.
    replace_newlinesWhether to replace newlines. If newlines have been replaced already, this should be false, to avoid errors e.g. on Windows.
    Warning
    Make sure all \t tab chars in text are intended as indent widths or alignment, not hard tabs, as those won't be preserved.
    Note
    This doesn't scroll the cursor in view afterwards.

Definition at line 2456 of file editor.c.

References count_indent_size(), editor_get_eol_char(), editor_indicator_set_on_range(), fix_indentation(), foreach_list, geany_cursor_marker, GEANY_INDICATOR_SNIPPET, SelectionRange::len, NULL, replace_cursor_markers(), sci, GeanyEditor::sci, sci_get_line(), sci_get_line_from_position(), sci_get_position_from_line(), sci_insert_text(), sci_set_current_position(), sci_set_selection(), SETPTR, SelectionRange::start, text, and utils_string_replace_all().

Referenced by editor_insert_snippet().

◆ editor_line_in_view()

gboolean editor_line_in_view ( GeanyEditor editor,
gint  line 
)

◆ editor_read_word_stem()

static const gchar * editor_read_word_stem ( GeanyEditor editor,
gint  pos,
const gchar *  wordchars 
)
static

Definition at line 1805 of file editor.c.

References GEANY_MAX_WORD_LENGTH, NULL, pos, read_current_word(), and wordchars.

Referenced by editor_complete_snippet().

◆ editor_replace_spaces()

◆ editor_replace_tabs()

◆ editor_sci_notify_cb()

void editor_sci_notify_cb ( G_GNUC_UNUSED GtkWidget *  widget,
G_GNUC_UNUSED gint  scn,
gpointer  scnt,
gpointer  data 
)

Definition at line 1055 of file editor.c.

References geany_object, and NULL.

Referenced by document_new_file(), and document_open_file_full().

◆ editor_scroll_to_line()

void editor_scroll_to_line ( GeanyEditor editor,
gint  line,
gfloat  percent_of_view 
)

◆ editor_select_indent_block()

void editor_select_indent_block ( GeanyEditor editor)

◆ editor_select_lines()

◆ editor_select_paragraph()

void editor_select_paragraph ( GeanyEditor editor)

◆ editor_select_word()

void editor_select_word ( GeanyEditor editor)

◆ editor_set_font()

void editor_set_font ( GeanyEditor editor,
const gchar *  font 
)

Definition at line 4622 of file editor.c.

References GeanyEditor::sci, sci_zoom_off(), set_font(), and update_margins().

Referenced by ui_set_editor_font().

◆ editor_set_indent()

◆ editor_set_indent_type()

void editor_set_indent_type ( GeanyEditor editor,
GeanyIndentType  type 
)

Sets the indent type for editor.

Parameters
editorEditor.
typeIndent type.
Since
0.16

Definition at line 4649 of file editor.c.

References editor_set_indent(), and GeanyEditor::indent_width.

Referenced by on_detect_type_from_file_activate().

◆ editor_set_indent_width()

void editor_set_indent_width ( GeanyEditor editor,
gint  width 
)

Sets the indent width for editor.

Parameters
editorEditor.
widthNew indent width.
Since
1.27 (API 227)

Definition at line 4662 of file editor.c.

References editor_set_indent(), and GeanyEditor::indent_type.

Referenced by on_detect_width_from_file_activate(), and on_indent_width_activate().

◆ editor_set_indentation_guides()

◆ editor_set_line_wrapping()

void editor_set_line_wrapping ( GeanyEditor editor,
gboolean  wrap 
)

◆ editor_show_calltip()

◆ editor_smart_line_indentation()

◆ editor_snippets_free()

void editor_snippets_free ( void  )

◆ editor_snippets_init()

◆ editor_start_auto_complete()

◆ editor_strip_line_trailing_spaces()

◆ editor_strip_trailing_spaces()

◆ editor_toggle_fold()

◆ editor_unfold_all()

void editor_unfold_all ( GeanyEditor editor)

◆ ensure_range_visible()

static void ensure_range_visible ( ScintillaObject *  sci,
gint  posStart,
gint  posEnd,
gboolean  enforcePolicy 
)
static

◆ expand()

static void expand ( ScintillaObject *  sci,
gint *  line,
gboolean  doExpand,
gboolean  force,
gint  visLevels,
gint  level 
)
static

◆ find_block_stop()

static gint find_block_stop ( GeanyEditor editor,
gint  line,
gint  direction 
)
static

◆ find_calltip()

◆ find_in_current_style()

static gint find_in_current_style ( ScintillaObject *  sci,
const gchar *  text,
gboolean  backwards 
)
static

◆ find_next_snippet_indicator()

static gboolean find_next_snippet_indicator ( GeanyEditor editor,
SelectionRange sel 
)
static

◆ find_paragraph_stop()

static gint find_paragraph_stop ( GeanyEditor editor,
gint  line,
gint  direction 
)
static

Definition at line 3786 of file editor.c.

References line, sci, GeanyEditor::sci, sci_get_line_count(), and sci_is_blank_line().

Referenced by editor_select_paragraph().

◆ find_previous_brace()

static gint find_previous_brace ( ScintillaObject *  sci,
gint  pos 
)
static

◆ find_start_bracket()

static gint find_start_bracket ( ScintillaObject *  sci,
gint  pos 
)
static

Definition at line 1830 of file editor.c.

References pos, sci, and sci_get_char_at().

Referenced by editor_show_calltip().

◆ fix_indentation()

◆ fold_all()

◆ fold_changed()

static void fold_changed ( ScintillaObject *  sci,
gint  line,
gint  levelNow,
gint  levelPrev 
)
static

◆ free_()

static void free_ ( void *  doc)
static

Definition at line 5350 of file editor.c.

◆ G_DEFINE_BOXED_TYPE()

G_DEFINE_BOXED_TYPE ( GeanyEditor  ,
editor  ,
copy_  ,
free_   
)

◆ get_brace_indent()

static gint get_brace_indent ( ScintillaObject *  sci,
gint  line 
)
static

◆ get_default_indent_prefs()

static const GeanyIndentPrefs * get_default_indent_prefs ( void  )
static

◆ get_default_prefs()

◆ get_doc_words()

◆ get_indent_size_after_line()

◆ get_multiline_comment_style()

◆ get_python_indent()

static gint get_python_indent ( ScintillaObject *  sci,
gint  line 
)
static

◆ get_sci_line_code_end_position()

static gint get_sci_line_code_end_position ( ScintillaObject *  sci,
gint  line 
)
static

◆ get_tab_width()

static gint get_tab_width ( const GeanyIndentPrefs indent_prefs)
static

◆ get_whitespace()

static gchar * get_whitespace ( const GeanyIndentPrefs iprefs,
gint  width 
)
static

◆ get_xml_indent()

◆ handle_xml()

◆ in_block_comment()

◆ insert_closing_tag()

static void insert_closing_tag ( GeanyEditor editor,
gint  pos,
gchar  ch,
const gchar *  tag_name 
)
static

◆ insert_indent_after_line()

◆ is_comment_char()

static gboolean is_comment_char ( gchar  c,
gint  lexer 
)
static

Definition at line 3513 of file editor.c.

References SCLEX_D.

Referenced by auto_multiline().

◆ is_style_php()

static gboolean is_style_php ( gint  style)
static

◆ lexer_has_braces()

static gboolean lexer_has_braces ( ScintillaObject *  sci)
static

◆ load_kb()

static void load_kb ( GKeyFile *  sysconfig,
GKeyFile *  userconfig 
)
static

Definition at line 239 of file editor.c.

References add_kb(), foreach_strv, NULL, and ptr.

Referenced by editor_snippets_init().

◆ match_last_chars()

static gboolean match_last_chars ( ScintillaObject *  sci,
gint  pos,
const gchar *  str 
)
static

Definition at line 644 of file editor.c.

References pos, sci, and sci_get_text_range().

Referenced by autocomplete_scope().

◆ on_char_added()

◆ on_document_save()

static void on_document_save ( GObject *  obj,
GeanyDocument doc 
)
static

◆ on_editor_button_press_event()

◆ on_editor_draw()

static gboolean on_editor_draw ( GtkWidget *  widget,
cairo_t *  cr,
gpointer  user_data 
)
static

Definition at line 4816 of file editor.c.

References editor_check_colourise().

Referenced by create_new_sci().

◆ on_editor_focus_in()

static gboolean on_editor_focus_in ( GtkWidget *  widget,
GdkEventFocus *  event,
gpointer  user_data 
)
static

Definition at line 4807 of file editor.c.

References editor_check_colourise().

Referenced by create_new_sci().

◆ on_editor_notify()

◆ on_editor_scroll_event()

static gboolean on_editor_scroll_event ( GtkWidget *  widget,
GdkEventScroll *  event,
gpointer  user_data 
)
static

Definition at line 4757 of file editor.c.

References GeanyEditor::sci, SCI_PAGEDOWN, SCI_PAGEUP, sci_scroll_columns(), and sci_send_command().

Referenced by create_new_sci().

◆ on_margin_click()

◆ on_new_line_added()

◆ on_snippet_keybinding_activate()

◆ on_update_ui()

◆ partial_complete()

static void partial_complete ( ScintillaObject *  sci,
const gchar *  text 
)
static

◆ read_current_word()

static void read_current_word ( GeanyEditor editor,
gint  pos,
gchar *  word,
gsize  wordlen,
const gchar *  wc,
gboolean  stem 
)
static

◆ read_indent()

static void read_indent ( GeanyEditor editor,
gint  pos 
)
static

◆ real_comment_multiline()

static void real_comment_multiline ( GeanyEditor editor,
gint  line_start,
gint  last_line 
)
static

◆ real_uncomment_multiline()

◆ register_named_icon()

static gboolean register_named_icon ( ScintillaObject *  sci,
guint  id,
const gchar *  name 
)
static

Definition at line 4865 of file editor.c.

References error(), name, NULL, pixbuf, sci, SCI_REGISTERRGBAIMAGE, SCI_RGBAIMAGESETHEIGHT, and SCI_RGBAIMAGESETWIDTH.

Referenced by create_new_sci().

◆ replace_cursor_markers()

static GSList * replace_cursor_markers ( GeanyEditor editor,
GString *  template,
gboolean  indicator_for_first 
)
static

◆ request_reshowing_calltip()

static void request_reshowing_calltip ( SCNotification nt)
static

Definition at line 679 of file editor.c.

References calltip, NULL, and reshow_calltip().

Referenced by on_char_added(), and on_editor_notify().

◆ reshow_calltip()

static gboolean reshow_calltip ( gpointer  data)
static

◆ sci_delete_line()

static void sci_delete_line ( ScintillaObject *  sci,
gint  line 
)
static

◆ sci_is_blank_line()

static gboolean sci_is_blank_line ( ScintillaObject *  sci,
gint  line 
)
static

◆ set_font()

static void set_font ( ScintillaObject *  sci,
const gchar *  font 
)
static

Definition at line 4601 of file editor.c.

References sci, sci_set_font_fractional(), and STYLE_MAX.

Referenced by editor_create_widget(), and editor_set_font().

◆ setup_sci_keys()

◆ show_autocomplete()

static void show_autocomplete ( ScintillaObject *  sci,
gsize  rootlen,
GString *  words 
)
static

◆ show_tags_list()

static void show_tags_list ( GeanyEditor editor,
const GPtrArray *  tags,
gsize  rootlen 
)
static

◆ smart_line_indentation()

static void smart_line_indentation ( GeanyEditor editor,
gint  first_line,
gint  last_line 
)
static

◆ snippets_complete_constructs()

static gboolean snippets_complete_constructs ( GeanyEditor editor,
gint  pos,
const gchar *  word 
)
static

◆ snippets_find_completion_by_name()

static const gchar * snippets_find_completion_by_name ( const gchar *  type,
const gchar *  name 
)
static

◆ snippets_load()

static void snippets_load ( GKeyFile *  sysconfig,
GKeyFile *  userconfig 
)
static

Definition at line 117 of file editor.c.

References NULL, snippet_hash, and utils_get_setting_string().

Referenced by editor_snippets_init().

◆ snippets_make_replacements()

◆ snippets_replace_specials()

static void snippets_replace_specials ( gpointer  key,
gpointer  value,
gpointer  user_data 
)
static

Definition at line 2342 of file editor.c.

References NULL, and utils_string_replace_all().

Referenced by snippets_make_replacements().

◆ update_margins()

Variable Documentation

◆ autocomplete_scope_shown

gboolean autocomplete_scope_shown = FALSE
static

Definition at line 69 of file editor.c.

Referenced by autocomplete_scope(), editor_start_auto_complete(), and on_editor_notify().

◆ brace_timeout_active

gboolean brace_timeout_active = FALSE
static

Definition at line 3404 of file editor.c.

Referenced by delay_match_brace(), and editor_highlight_braces().

◆ 

◆ current_word

gchar current_word[192]
static

Definition at line 74 of file editor.c.

Referenced by check_partial_completion(), and on_editor_button_press_event().

◆ editor_info

◆ editor_prefs

GeanyEditorPrefs editor_prefs

Definition at line 77 of file editor.c.

Referenced by add_color_scheme_item(), auto_close_chars(), autocomplete_doc_word(), autocomplete_tags(), brace_match(), cb_func_document_action(), cb_func_goto_action(), check_snippet_completion(), create_new_sci(), create_project(), delay_match_brace(), do_main_quit(), document_new_file(), document_open_file_full(), document_update_tag_list_in_idle(), editor_apply_update_prefs(), editor_complete_snippet(), editor_do_comment(), editor_do_comment_toggle(), editor_do_uncomment(), editor_get_long_line_column(), editor_get_long_line_type(), editor_highlight_braces(), editor_init(), editor_set_indentation_guides(), editor_start_auto_complete(), editor_toggle_fold(), find_previous_brace(), fold_all(), geany_data_init(), get_current_tag_name(), get_default_indent_prefs(), get_default_prefs(), get_doc_words(), goto_compiler_file_line(), handle_xml(), init_pref_groups(), init_stash_prefs(), load_config(), load_dialog_prefs(), load_named_styles(), on_color_button_choose_cb(), on_color_scheme_changed(), on_editor_button_press_event(), on_editor_notify(), on_margin_click(), on_markers_margin1_toggled(), on_menu_show_indentation_guides1_toggled(), on_menu_show_line_endings1_toggled(), on_menu_show_white_space1_toggled(), on_new_line_added(), on_prefs_dialog_response(), on_show_line_numbers1_toggled(), prefs_init_dialog(), process_build_output_line(), reflow_lines(), save_dialog_prefs(), setup_sci_keys(), show_tags_list(), ui_toggle_editor_features(), ui_update_fold_items(), ui_update_view_editor_menu_items(), and update_margins().

◆ geany_cursor_marker

const gchar geany_cursor_marker[] = "__GEANY_CURSOR_MARKER__"
static

◆ indent

◆ last_word

gchar* last_word

Definition at line 85 of file editor.c.

◆ pos

gint pos

Definition at line 87 of file editor.c.

Referenced by add_new_position(), addReferenceTag(), addTag(), appendLineFposMap(), at_eol(), auto_close_chars(), autocomplete_check_html(), autocomplete_scope(), brace_match(), build_parse_make_dir(), Scintilla::ScintillaGTKAccessible::ByteOffsetFromCharacterOffset(), Scintilla::CallTip::CallTipStart(), cb_func_search_action(), change_tab_indentation(), Scintilla::Partitioning< T >::Check(), check_line_breaking(), check_snippet_completion(), Scintilla::Document::ClampPositionIntoDocument(), close_block(), ClusterIterator::ClusterIterator(), Scintilla::LexAccessor::ColourTo(), compoundPosForOffset(), Scintilla::Range::Contains(), Scintilla::SelectionRange::Contains(), Scintilla::Range::ContainsCharacter(), Scintilla::Document::ConvertLineEnds(), create_statusbar_statistics(), currLineContainsHereDelims(), Scintilla::Document::DelChar(), Scintilla::Document::DelCharBack(), Scintilla::Document::DeleteChars(), detect_indent_width(), detect_tabs_and_spaces(), Scintilla::Editor::DisplayFromPosition(), Scintilla::EditView::DisplayFromPosition(), document_detect_indent_type(), document_open_file_full(), document_reload_force(), Scintilla::ScintillaGTK::DragMotionThis(), editor_complete_snippet(), editor_find_current_word(), editor_find_current_word_sciwc(), editor_get_word_at_pos(), editor_goto_line(), editor_goto_pos(), editor_indentation_by_one_space(), editor_insert_multiline_comment(), editor_insert_snippet(), editor_read_word_stem(), editor_select_word(), editor_show_calltip(), editor_start_auto_complete(), Scintilla::Document::EnsureStyledTo(), Scintilla::Document::ExtendStyleRange(), Scintilla::Document::ExtendWordSelect(), extract_dim(), extract_name(), find_next_snippet_indicator(), find_previous_brace(), find_regex(), find_start_bracket(), findExpressionStart(), Scintilla::LineLayout::FindPositionFromX(), BuiltinRegex::FindText(), Scintilla::Document::FindText(), Scintilla::Editor::FindText(), FoldNoBoxVHDLDoc(), followsDot(), followsKeyword(), FollowsPostfixOperator(), format_range(), get_brace_indent(), get_fold_header_after(), get_keyfile_keywords(), get_sci_line_code_end_position(), get_xml_indent(), Scintilla::Document::GetColumn(), GetContinuedPos(), GetIfLineComment(), Scintilla::Document::GetLineIndentPosition(), getPrevWord(), Scintilla::Document::GetRelativePosition(), Scintilla::Document::GetRelativePositionUTF16(), goto_file_pos(), goto_matching_brace(), goto_popup_position_func(), handle_xml(), HaskellIndentAmount(), ht_editor_notify_cb(), Scintilla::Accessor::IndentAmount(), Scintilla::Document::InGoodUTF8(), initRegexTag(), Scintilla::Selection::InSelectionForEOL(), insert_closing_tag(), insert_comment_template(), insert_date(), insert_include(), insert_multiline_comment(), Scintilla::Partitioning< T >::InsertPartition(), IsCommentBlockEnd(), IsCommentBlockStart(), IsCommentLine(), LexerSQL::IsCommentLine(), Scintilla::Document::IsCrLf(), isEmptyLine(), IsEscaped(), isMatch(), IsPackageLine(), Scintilla::Document::IsWordEndAt(), Scintilla::Document::IsWordStartAt(), keywordDoStartsLoop(), keywordIsModifier(), latexLastWordIsMathEnv(), Scintilla::Document::LenChar(), LexerJulia::Lex(), LexerPython::Lex(), LexerRust::Lex(), Scintilla::CellBuffer::LineFromPosition(), LineVector< POS >::LineFromPosition(), Scintilla::Document::LineFromPosition(), Scintilla::CellBuffer::LineFromPositionIndex(), Scintilla::Document::LineFromPositionIndex(), LineVector< POS >::LineFromPositionIndex(), Scintilla::Editor::LinesJoin(), LineType(), Scintilla::Editor::LocationFromPosition(), Scintilla::EditView::LocationFromPosition(), lookingAtHereDocDelim(), Scintilla::LexAccessor::Match(), match_last_chars(), Scintilla::Document::MatchesWordOptions(), matchMultilineRegexPattern(), matchTagPattern(), mio_getpos(), mio_gets(), mio_setpos(), Scintilla::Document::ModifiedAt(), Scintilla::ScintillaGTK::MoveImeCarets(), Scintilla::Editor::MovePositionOutsideChar(), Scintilla::Document::MovePositionOutsideChar(), Scintilla::Editor::MovePositionSoVisible(), Scintilla::Editor::MultipleSelectAdd(), navqueue_goto_line(), Scintilla::WorkNeeded::Need(), Scintilla::Editor::NeedShown(), ClusterIterator::Next(), Scintilla::Document::NextCharacter(), Scintilla::Document::NextPosition(), NextTab(), Scintilla::Document::NextWordEnd(), Scintilla::Document::NextWordStart(), Scintilla::Editor::NotifyNeedShown(), on_char_added(), on_comments_function_activate(), on_show_color_chooser1_activate(), on_update_ui(), open_session_file(), Scintilla::Document::ParaDown(), Scintilla::Document::ParaUp(), parseFn(), parseFunction(), parseImpl(), parseImports(), parseMacro(), parseShortFunction(), parseStruct(), partial_complete(), Scintilla::Partitioning< T >::PartitionFromPosition(), Scintilla::Editor::PasteRectangular(), plugin_add_toolbar_item(), PodHeadingLevel(), podLineScan(), Scintilla::Editor::PointInSelection(), Scintilla::Editor::PointIsHotspot(), Scintilla::ScintillaGTKAccessible::PositionAfter(), Scintilla::ScintillaGTKAccessible::PositionBefore(), Scintilla::Partitioning< T >::PositionFromPartition(), Scintilla::Editor::PositionInSelection(), Scintilla::ScintillaGTK::PressThis(), queue_pos_matches(), Scintilla::Editor::RangeContainsProtected(), read_current_word(), read_indent(), ResumeBlockComment(), ResumeLineComment(), ResumeRawString(), ResumeString(), Scintilla::LineLayoutCache::Retrieve(), sc_insert(), ScanCharacterLiteralOrLifetime(), ScanComments(), ScanDigits(), ScanIdentifier(), ScanNumber(), ScanNumericEscape(), ScanRawString(), ScanWhitespace(), sci_find_matching_brace(), sci_get_char_at(), sci_goto_pos(), sci_indicator_clear(), sci_indicator_fill(), sci_insert_text(), sci_set_anchor(), sci_set_current_line(), Scintilla::Document::SciLineFromPosition(), search_find_next(), Scintilla::Editor::SearchInTarget(), Scintilla::Editor::SearchText(), set_cursor_position(), Scintilla::Editor::SetHotSpotRange(), Scintilla::Partitioning< T >::SetPartitionStartPosition(), snippets_complete_constructs(), split_line(), Scintilla::Editor::StartEndDisplayLine(), Scintilla::EditView::StartEndDisplayLine(), Scintilla::LexAccessor::StartSegment(), stripCodeBuffer(), Scintilla::Document::StyleToAdjustingLineDuration(), Scintilla::Editor::StyleToPositionInView(), sync_to_current(), synchronizeDocStart(), toolbar_get_insert_position(), ui_menu_sort_by_label(), ui_update_statusbar(), Scintilla::ScintillaGTKAccessible::UpdateCursor(), utils_string_find(), utils_string_replace(), utils_string_replace_all(), utils_string_replace_first(), utils_tidy_path(), utils_wrap_string(), Scintilla::Selection::VirtualSpaceFor(), Scintilla::SurfaceImpl::WidthText(), Scintilla::Document::WordPartLeft(), Scintilla::Document::WordPartRight(), and Scintilla::Editor::WordSelection().

◆ sci

ScintillaObject* sci

Definition at line 88 of file editor.c.

Referenced by at_eol(), auto_close_chars(), auto_multiline(), autocomplete_doc_word(), autocomplete_scope(), brace_match(), cb_func_search_action(), cb_func_switch_action(), change_tab_indentation(), check_line_breaking(), check_snippet_completion(), close_block(), create_new_sci(), create_statusbar_statistics(), detect_indent_width(), detect_tabs_and_spaces(), document_detect_indent_type(), document_find_by_sci(), document_get_from_notebook_child(), document_replace_range(), document_try_focus(), editor_apply_update_prefs(), editor_change_line_indent(), editor_complete_snippet(), editor_create_widget(), editor_goto_next_snippet_cursor(), editor_indent(), editor_insert_text_block(), editor_set_indent(), editor_show_calltip(), editor_smart_line_indentation(), editor_start_auto_complete(), editor_toggle_fold(), ensure_range_visible(), expand(), find_block_stop(), find_in_current_style(), find_next_snippet_indicator(), find_paragraph_stop(), find_previous_brace(), find_range(), find_regex(), find_start_bracket(), fold_changed(), get_brace_indent(), get_current_word_or_sel(), get_doc_words(), get_fold_header_after(), get_indent_size_after_line(), get_python_indent(), get_sci_line_code_end_position(), get_xml_indent(), goto_popup_position_func(), handle_xml(), highlighting_set_styles(), insert_closing_tag(), insert_indent_after_line(), insert_line_after(), insert_line_before(), join_paragraph(), lexer_has_braces(), locate_sci_in_container(), margin_width_from_line_height(), match_last_chars(), merge_type_keywords(), on_char_added(), on_editor_notify(), on_new_line_added(), on_sci_notify(), on_toggle_case1_activate(), on_update_ui(), parse_cpp_function_at_line(), parse_function_at_line(), partial_complete(), read_current_word(), read_indent(), reflow_paragraph(), register_named_icon(), sci_add_text(), sci_assign_cmdkey(), sci_can_redo(), sci_can_undo(), sci_cancel(), sci_clear(), sci_clear_all(), sci_clear_cmdkey(), sci_colourise(), sci_convert_eols(), sci_copy(), sci_cut(), sci_delete_line(), sci_delete_marker_at_line(), sci_deselect_last_newline(), sci_empty_undo_buffer(), sci_end_undo_action(), sci_ensure_line_is_visible(), sci_find_matching_brace(), sci_find_text(), sci_get_char_at(), sci_get_col_from_position(), sci_get_contents(), sci_get_contents_range(), sci_get_current_line(), sci_get_current_position(), sci_get_cursor_virtual_space(), sci_get_end_styled(), sci_get_eol_mode(), sci_get_first_visible_line(), sci_get_fold_expanded(), sci_get_fold_level(), sci_get_fold_parent(), sci_get_length(), sci_get_lexer(), sci_get_line(), sci_get_line_count(), sci_get_line_end_position(), sci_get_line_from_position(), sci_get_line_indent_position(), sci_get_line_indentation(), sci_get_line_is_visible(), sci_get_line_length(), sci_get_lines_selected(), sci_get_overtype(), sci_get_pos_at_line_sel_end(), sci_get_pos_at_line_sel_start(), sci_get_position_after(), sci_get_position_from_col(), sci_get_position_from_line(), sci_get_position_from_xy(), sci_get_selected_text(), sci_get_selected_text_length(), sci_get_selection_contents(), sci_get_selection_end(), sci_get_selection_mode(), sci_get_selection_start(), sci_get_string(), sci_get_style_at(), sci_get_tab_width(), sci_get_text(), sci_get_text_range(), sci_goto_line(), sci_goto_pos(), sci_has_selection(), sci_indicator_clear(), sci_indicator_fill(), sci_indicator_set(), sci_insert_text(), sci_is_blank_line(), sci_is_marker_set_at_line(), sci_is_modified(), sci_line_duplicate(), sci_lines_join(), sci_marker_delete_all(), sci_marker_next(), sci_marker_previous(), sci_move_selected_lines_down(), sci_move_selected_lines_up(), sci_paste(), sci_redo(), sci_replace_sel(), sci_replace_target(), sci_scroll_caret(), sci_scroll_columns(), sci_search_next(), sci_search_prev(), sci_select_all(), sci_selection_duplicate(), sci_send_command(), sci_send_message_internal(), sci_set_anchor(), sci_set_autoc_max_height(), sci_set_caret_policy_x(), sci_set_caret_policy_y(), sci_set_codepage(), sci_set_current_line(), sci_set_current_position(), sci_set_eol_mode(), sci_set_folding_margin_visible(), sci_set_font(), sci_set_font_fractional(), sci_set_indentation_guides(), sci_set_keywords(), sci_set_lexer(), sci_set_line_indentation(), sci_set_line_numbers(), sci_set_lines_wrapped(), sci_set_mark_long_lines(), sci_set_marker_at_line(), sci_set_property(), sci_set_readonly(), sci_set_savepoint(), sci_set_scroll_stop_at_last_line(), sci_set_scrollbar_mode(), sci_set_search_anchor(), sci_set_selection(), sci_set_selection_end(), sci_set_selection_mode(), sci_set_selection_start(), sci_set_symbol_margin(), sci_set_tab_indents(), sci_set_tab_width(), sci_set_target_end(), sci_set_target_start(), sci_set_text(), sci_set_undo_collection(), sci_set_use_tabs(), sci_set_visible_eols(), sci_set_visible_white_spaces(), sci_start_undo_action(), sci_text_height_cached(), sci_text_width(), sci_toggle_fold(), sci_toggle_marker_at_line(), sci_undo(), sci_use_popup(), sci_word_end_position(), sci_word_start_position(), sci_zoom_in(), sci_zoom_off(), sci_zoom_out(), scintilla_init(), scintilla_object_send_message(), scintilla_send_message(), scintilla_set_id(), search_find_next(), search_find_prev(), search_find_text(), search_replace_match(), search_replace_range(), set_character_classes(), set_font(), set_line_numbers(), set_sci_style(), setup_sci_keys(), show_autocomplete(), show_tags_list(), snippets_complete_constructs(), split_line(), styleset_common(), styleset_default(), styleset_from_mapping(), sync_to_current(), update_margins(), write_html_file(), and write_latex_file().

◆ set

◆ snippet_accel_group

GtkAccelGroup* snippet_accel_group = NULL
static

Definition at line 68 of file editor.c.

Referenced by add_kb(), editor_snippets_free(), and editor_snippets_init().

◆ snippet_hash

◆ tag_index

guint tag_index

Definition at line 86 of file editor.c.

◆ text

gchar* text

Definition at line 83 of file editor.c.

Referenced by Scintilla::ScintillaGTKAccessible::AtkTextIface::AddSelection(), Scintilla::Editor::AddStyledText(), Scintilla::Document::AnnotationSetText(), appendText(), Scintilla::ScintillaBase::AutoCompleteInsert(), Scintilla::CellBuffer::BasicDeleteChars(), build_add_dialog_row(), cb_func_search_action(), cc_dialog_on_command_edited(), cc_dialog_on_label_edited(), check_partial_completion(), close_block(), completion_match_selected(), Scintilla::Editor::CopyRangeToClipboard(), Scintilla::Editor::CopySelectionRange(), Scintilla::ScintillaGTKAccessible::AtkEditableTextIface::CopyText(), Scintilla::Editor::CopyText(), create_config_dir(), Scintilla::ScintillaGTKAccessible::AtkEditableTextIface::CutText(), Scintilla::Document::DBCSDrawBytes(), delegate_entry_activate_backward_cb(), delegate_entry_activate_cb(), delegate_entry_changed_cb(), Scintilla::Document::DeleteChars(), Scintilla::ScintillaGTKAccessible::AtkEditableTextIface::DeleteText(), dialogs_show_msgbox(), dialogs_show_msgbox_with_secondary(), dialogs_show_question(), do_toolbar_search(), document_clone(), document_find_text(), document_new_file(), document_search_bar_find(), document_show_message(), draw_page(), Scintilla::EditView::DrawFoldDisplayText(), Scintilla::Editor::Duplicate(), editor_do_comment(), editor_insert_alternative_whitespace(), editor_insert_multiline_comment(), editor_insert_text_block(), editor_replace_spaces(), encodings_encoding_store_cell_data_func(), Scintilla::Document::EOLAnnotationSetText(), filetype_combo_cell_data_func(), find_in_current_style(), find_regex(), Scintilla::FixInvalidUTF8(), gb_on_key_pressed(), geany_wrap_label_new(), get_line_and_offset_from_text(), get_regex_match_string(), get_text_dimensions(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetCaretOffset(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetCharacterAtOffset(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetCharacterCount(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetCharacterExtents(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetDefaultAttributes(), Scintilla::EditModel::GetFoldDisplayText(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetNSelections(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetOffsetAtPoint(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetRunAttributes(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetSelection(), Scintilla::ScintillaGTK::GetSelection(), Scintilla::Editor::GetTag(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetText(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetTextAfterOffset(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetTextAtOffset(), Scintilla::ScintillaGTKAccessible::AtkTextIface::GetTextBeforeOffset(), ListBoxX::GetValue(), goto_tag(), insert_comment_template(), insert_include(), insert_indent_after_line(), Scintilla::Editor::InsertPaste(), Scintilla::Editor::InsertPasteShape(), Scintilla::Document::InsertString(), Scintilla::ScintillaGTKAccessible::AtkEditableTextIface::InsertText(), Scintilla::ScintillaGTKAccessible::InsertText(), Scintilla::IsNullOrEmpty(), list_store_append_text(), Scintilla::Document::MarginSetText(), on_comments_changelog_activate(), on_comments_fileheader_activate(), on_comments_function_activate(), on_toggle_case1_activate(), on_toolbar_search_entry_activate(), on_toolbar_search_entry_changed(), on_toolbutton_goto_clicked(), on_toolbutton_goto_entry_activate(), on_toolbutton_search_clicked(), partial_complete(), Scintilla::ScintillaGTKAccessible::AtkEditableTextIface::PasteText(), Scintilla::ScintillaGTKAccessible::PasteText(), proxy_init(), readTag(), readTagContent(), Scintilla::CellBuffer::RecalculateIndexLineStarts(), Scintilla::ScintillaGTKAccessible::AtkTextIface::RemoveSelection(), replace_static_values(), Scintilla::Editor::ReplaceTarget(), Scintilla::Document::SafeSegment(), Scintilla::UniqueStringSet::Save(), save_convert_to_encoding(), sci_add_text(), sci_get_contents(), sci_get_contents_range(), sci_get_selected_text(), sci_get_text(), sci_get_text_range(), sci_insert_text(), sci_replace_sel(), sci_replace_target(), sci_search_next(), sci_search_prev(), sci_set_keywords(), sci_set_text(), sci_text_width(), search_finished(), search_show_find_in_files_dialog_full(), Scintilla::Editor::SearchInTarget(), set_build_command_entry_text(), set_statusbar(), Scintilla::ScintillaGTKAccessible::AtkTextIface::SetCaretOffset(), Scintilla::EditModel::SetDefaultFoldDisplayText(), Scintilla::ScintillaGTKAccessible::AtkTextIface::SetSelection(), Scintilla::LineAnnotation::SetText(), Scintilla::ScintillaGTKAccessible::AtkEditableTextIface::SetTextContents(), setup_find(), setup_find_next(), show_goto_popup(), stash_tree_append_pref(), stash_tree_renderer_set_data(), stash_tree_update_pref(), Scintilla::Document::SubstituteByPosition(), BuiltinRegex::SubstituteByPosition(), target_directory_button_clicked_cb(), Scintilla::ScintillaGTK::TargetAsUTF8(), tb_editor_drag_data_rcvd_cb(), templates_get_template_function(), templates_replace_command(), templates_replace_default_dates(), templates_replace_valist(), Scintilla::Editor::TextWidth(), tools_word_count(), tree_model_find_text(), ui_button_new_with_image(), ui_combo_box_add_to_history(), ui_combo_box_prepend_text_once(), ui_label_new_bold(), ui_label_set_markup(), ui_menu_item_get_text(), ui_progress_bar_start(), ui_widget_set_tooltip_text(), Scintilla::UniqueStringCopy(), utils_write_file(), Scintilla::WidthStyledText(), Scintilla::Editor::WndProc(), and word_count().