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
![]() ![]() |
#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>
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 GeanyFiletype * | editor_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 GeanyEditorPrefs * | get_default_prefs (void) |
const GeanyEditorPrefs * | editor_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 GeanyIndentPrefs * | get_default_indent_prefs (void) |
const GeanyIndentPrefs * | editor_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... | |
GeanyEditor * | editor_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 |
#define CURSOR_PLACEHOLDER "_" /* Would rather use … but not all docs are unicode */ |
|
static |
Definition at line 212 of file editor.c.
References group, NULL, on_snippet_keybinding_activate(), and snippet_accel_group.
Referenced by load_kb().
|
static |
Definition at line 1848 of file editor.c.
References TMTag::arglist, EMPTY, GEANY_FILETYPES_GO, GEANY_FILETYPES_PASCAL, TMTag::name, TMTag::pointerOrder, TMTag::scope, symbols_get_context_separator(), and TMTag::var_type.
Referenced by editor_get_calltip_text(), and find_calltip().
|
static |
Definition at line 2636 of file editor.c.
References line, pos, sci, sci_get_char_at(), sci_get_line_end_position(), and sci_get_line_from_position().
Referenced by editor_complete_snippet().
|
static |
Definition at line 1527 of file editor.c.
References GeanyEditorPrefs::autoclose_chars, editor_prefs, NULL, pos, sci, sci_add_text(), sci_find_matching_brace(), sci_set_current_position(), and utils_isbrace().
Referenced by on_char_added().
|
static |
Definition at line 3525 of file editor.c.
References editor_get_indent_prefs(), in_block_comment(), is_comment_char(), NULL, SCE_D_COMMENTNESTED, sci, GeanyEditor::sci, sci_add_text(), SCI_DELETEBACKNOTLINE, sci_get_col_from_position(), sci_get_length(), sci_get_lexer(), sci_get_line(), sci_get_line_indent_position(), sci_get_style_at(), and GeanyIndentPrefs::width.
Referenced by on_new_line_added().
|
static |
Definition at line 988 of file editor.c.
References GeanyEditor::document, GeanyDocumentPrivate::line_count, GeanyDocument::priv, GeanyEditor::sci, sci_get_line_count(), and sci_set_line_numbers().
Referenced by on_editor_notify().
|
static |
Definition at line 2095 of file editor.c.
References autocomplete_tags(), GeanyEditor::document, GeanyDocument::file_type, filetypes_index(), GEANY_FILETYPES_HTML, GEANY_FILETYPES_PHP, GEANY_MAX_WORD_LENGTH, GEANY_WORDCHARS, GeanyFiletype::id, is_style_php(), NULL, pos, read_current_word(), SCE_HJ_START, GeanyEditor::sci, sci_get_lexer(), and SCLEX_XML.
Referenced by editor_start_auto_complete().
|
static |
Definition at line 2187 of file editor.c.
References GeanyEditorPrefs::autocompletion_max_entries, editor_prefs, foreach_slist, get_doc_words(), sci, GeanyEditor::sci, SCI_AUTOCCANCEL, and show_autocomplete().
Referenced by editor_start_auto_complete().
|
static |
Definition at line 692 of file editor.c.
References autocomplete_scope_shown, GeanyEditor::document, editor_get_word_at_pos(), GeanyDocument::file_type, foreach_ptr_array, GEANY_FILETYPES_C, GEANY_FILETYPES_CPP, GeanyFiletype::id, GeanyFiletype::lang, match_last_chars(), name, TMTag::name, NULL, pos, sci, GeanyEditor::sci, sci_find_matching_brace(), sci_get_char_at(), sci_get_current_position(), show_tags_list(), symbols_get_current_scope(), GeanyDocument::tm_file, tm_parser_context_separator(), and tm_workspace_find_scope_members().
Referenced by editor_start_auto_complete().
|
static |
Definition at line 2078 of file editor.c.
References GeanyEditorPrefs::autocompletion_max_entries, editor_prefs, GeanyFiletype::lang, show_tags_list(), and tm_workspace_find_prefix().
Referenced by autocomplete_check_html(), and editor_start_auto_complete().
|
static |
Definition at line 1570 of file editor.c.
References GeanyEditorPrefs::brace_match_ltgt, editor_prefs, pos, sci, sci_colourise(), sci_get_char_at(), sci_get_end_styled(), sci_get_length(), sci_get_style_at(), utils_brace_opposite(), and utils_is_opening_brace().
Referenced by close_block().
|
static |
Definition at line 5214 of file editor.c.
References editor_get_indent_prefs(), line, pos, sci, GeanyEditor::sci, sci_get_char_at(), sci_get_line_indentation(), sci_get_position_from_line(), sci_insert_text(), sci_replace_sel(), sci_set_line_indentation(), sci_set_selection(), and GeanyIndentPrefs::width.
Referenced by editor_change_line_indent().
|
static |
Definition at line 536 of file editor.c.
References get_project_pref, line, GeanyEditor::line_breaking, pos, SC_SEL_STREAM, sci, GeanyEditor::sci, sci_cancel(), sci_get_char_at(), sci_get_col_from_position(), sci_get_current_line(), sci_get_line_end_position(), sci_get_position_from_col(), sci_get_position_from_line(), sci_get_selection_mode(), SCI_NEWLINE, sci_scroll_caret(), sci_send_command(), and sci_set_current_position().
Referenced by on_char_added().
|
static |
Definition at line 1015 of file editor.c.
References current_word, entry, foreach_str, NULL, partial_complete(), ptr, read_current_word(), GeanyEditor::sci, strstr(), text, and utils_strdupa.
Referenced by editor_complete_word_part().
|
static |
Definition at line 1611 of file editor.c.
References GeanyIndentPrefs::auto_indent_mode, brace_match(), GeanyEditor::document, editor_get_indent_prefs(), GeanyDocument::file_type, GEANY_AUTOINDENT_CURRENTCHARS, GEANY_AUTOINDENT_MATCHBRACES, get_whitespace(), lexer_has_braces(), line, MAX, NULL, pos, sci, GeanyEditor::sci, sci_get_line(), sci_get_line_end_position(), sci_get_line_from_position(), sci_get_line_indentation(), sci_get_position_from_line(), sci_replace_sel(), sci_set_anchor(), sci_set_line_indentation(), text, and GeanyIndentPrefs::width.
Referenced by on_char_added().
|
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().
|
static |
Definition at line 4907 of file editor.c.
References CARET_EVEN, CARET_JUMPS, editor_prefs, GeanyEditorPrefs::ime_interaction, GeanyEditor::line_wrapping, NULL, on_editor_button_press_event(), on_editor_draw(), on_editor_focus_in(), on_editor_scroll_event(), on_motion_event(), register_named_icon(), SC_CP_UTF8, sci, GeanyEditor::sci, SCI_AUTOCSETSEPARATOR, sci_set_caret_policy_x(), sci_set_codepage(), sci_set_lines_wrapped(), SCI_SETADDITIONALSELECTIONTYPING, SCI_SETBUFFEREDDRAW, SCI_SETIMEINTERACTION, SCI_SETRECTANGULARSELECTIONMODIFIER, SCI_SETSCROLLWIDTHTRACKING, SCI_SETVIRTUALSPACEOPTIONS, sci_use_popup(), scintilla_new(), SCMOD_ALT, SCMOD_CTRL, setup_sci_keys(), and GeanyEditorPrefs::show_virtual_space.
Referenced by editor_create_widget().
|
static |
Definition at line 3406 of file editor.c.
References GeanyEditorPrefs::brace_match_ltgt, brace_timeout_active, document_get_current(), GeanyDocument::editor, editor_highlight_braces(), editor_prefs, GeanyEditor::sci, SCI_BRACEBADLIGHT, SCI_BRACEHIGHLIGHT, sci_find_matching_brace(), sci_get_char_at(), sci_get_col_from_position(), sci_get_current_position(), SCI_SETHIGHLIGHTGUIDE, and utils_isbrace().
Referenced by editor_highlight_braces().
void editor_apply_update_prefs | ( | GeanyEditor * | editor | ) |
Definition at line 5161 of file editor.c.
References CARET_EVEN, CARET_SLOP, CARET_STRICT, GeanyEditorPrefs::completion_drops_rest_of_word, editor_get_long_line_column(), editor_get_long_line_type(), editor_prefs, editor_set_indent(), editor_set_indentation_guides(), GeanyEditorPrefs::folding, GeanyEditor::indent_type, GeanyEditor::indent_width, GeanyEditorPrefs::long_line_color, main_status, NULL, sci, GeanyEditor::sci, sci_assign_cmdkey(), SCI_AUTOCSETDROPRESTOFWORD, SCI_HOMEEXTEND, SCI_HOMERECTEXTEND, sci_set_autoc_max_height(), sci_set_caret_policy_y(), sci_set_folding_margin_visible(), sci_set_line_numbers(), sci_set_mark_long_lines(), sci_set_scroll_stop_at_last_line(), sci_set_scrollbar_mode(), sci_set_symbol_margin(), sci_set_tab_indents(), sci_set_visible_eols(), sci_set_visible_white_spaces(), SCI_SETVIRTUALSPACEOPTIONS, SCI_VCHOMEEXTEND, SCI_VCHOMERECTEXTEND, SCK_HOME, SCMOD_ALT, SCMOD_SHIFT, GeanyEditorPrefs::scroll_lines_around_cursor, GeanyEditorPrefs::scroll_stop_at_last_line, GeanyEditorPrefs::show_line_endings, GeanyEditorPrefs::show_linenumber_margin, GeanyEditorPrefs::show_markers_margin, GeanyEditorPrefs::show_scrollbars, GeanyEditorPrefs::show_virtual_space, GeanyEditorPrefs::show_white_space, GeanyEditorPrefs::smart_home_key, GeanyEditorPrefs::symbolcompletion_max_height, and GeanyEditorPrefs::use_tab_to_indent.
Referenced by apply_editor_prefs(), editor_create_widget(), and on_prefs_dialog_response().
|
static |
Definition at line 5241 of file editor.c.
References change_tab_indentation(), editor_get_indent_prefs(), GEANY_INDENT_TYPE_TABS, line, sci, GeanyEditor::sci, sci_get_line_indentation(), sci_set_line_indentation(), GeanyIndentPrefs::type, and GeanyIndentPrefs::width.
Referenced by editor_indent().
|
static |
Definition at line 4784 of file editor.c.
References GeanyDocumentPrivate::colourise_needed, GeanyEditor::document, NULL, GeanyDocument::priv, GeanyEditor::sci, sci_colourise(), symbols_get_current_function(), and ui_update_statusbar().
Referenced by on_editor_draw(), and on_editor_focus_in().
gboolean editor_complete_snippet | ( | GeanyEditor * | editor, |
gint | pos | ||
) |
Definition at line 2655 of file editor.c.
References at_eol(), GeanyEditorPrefs::complete_snippets_whilst_editing, editor_prefs, editor_read_word_stem(), EMPTY, GEANY_KEY_GROUP_EDITOR, GEANY_KEYS_EDITOR_COMPLETESNIPPET, keybindings_lookup_item(), NULL, pos, sci, GeanyEditor::sci, sci_cancel(), sci_end_undo_action(), sci_get_char_at(), sci_has_selection(), sci_start_undo_action(), snippets_complete_constructs(), and snippets_find_completion_by_name().
Referenced by check_snippet_completion().
gboolean editor_complete_word_part | ( | GeanyEditor * | editor | ) |
Definition at line 5050 of file editor.c.
References check_partial_completion(), entry, GeanyEditor::sci, SCI_AUTOCACTIVE, SCI_AUTOCCOMPLETE, SCI_AUTOCGETCURRENTTEXT, and sci_get_string().
Referenced by cb_func_editor_action().
GeanyEditor * editor_create | ( | GeanyDocument * | doc | ) |
Definition at line 5011 of file editor.c.
References GeanyEditor::auto_indent, GeanyIndentPrefs::auto_indent_mode, GeanyEditor::document, GeanyDocument::editor, editor_create_widget(), GEANY_AUTOINDENT_NONE, get_default_indent_prefs(), get_project_pref, GeanyEditor::line_breaking, GeanyEditor::line_wrapping, GeanyEditor::sci, and GeanyEditor::scroll_percent.
Referenced by document_create().
ScintillaObject * editor_create_widget | ( | GeanyEditor * | editor | ) |
Creates a new Scintilla GtkWidget
based on the settings for editor.
editor | Editor settings. |
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().
void editor_destroy | ( | GeanyEditor * | editor | ) |
Definition at line 5030 of file editor.c.
Referenced by remove_page().
void editor_display_current_line | ( | GeanyEditor * | editor, |
gfloat | percent_of_view | ||
) |
Definition at line 4108 of file editor.c.
References editor_line_in_view(), line, NULL, GeanyEditor::sci, sci_ensure_line_is_visible(), sci_get_current_line(), sci_scroll_caret(), and GeanyEditor::scroll_percent.
Referenced by cb_func_goto_action(), goto_matching_brace(), search_find_again(), and search_find_selection().
gint editor_do_comment | ( | GeanyEditor * | editor, |
gint | line, | ||
gboolean | allow_empty_lines, | ||
gboolean | toggle, | ||
gboolean | single_comment | ||
) |
Definition at line 3284 of file editor.c.
References GeanyEditorPrefs::comment_toggle_mark, GeanyFiletype::comment_use_indent, count, GeanyEditor::document, editor_get_eol_char_len(), editor_get_filetype_at_line(), editor_prefs, EMPTY, GeanyDocument::file_type, filetype_get_comment_open_close(), get_multiline_comment_style(), line, MAX, NULL, real_comment_multiline(), GeanyEditor::sci, sci_end_undo_action(), sci_get_line_end_position(), sci_get_line_from_position(), sci_get_position_from_line(), sci_get_selection_end(), sci_get_selection_start(), sci_get_style_at(), sci_get_text_range(), sci_insert_text(), sci_set_selection_end(), sci_set_selection_start(), sci_start_undo_action(), and text.
Referenced by editor_do_comment_toggle(), editor_insert_multiline_comment(), and on_menu_comment_line1_activate().
void editor_do_comment_toggle | ( | GeanyEditor * | editor | ) |
Definition at line 3115 of file editor.c.
References GeanyEditorPrefs::comment_toggle_mark, GeanyEditor::document, editor_do_comment(), editor_do_uncomment(), editor_get_eol_char_len(), editor_get_filetype_at_line(), editor_prefs, EMPTY, GeanyDocument::file_type, filetype_get_comment_open_close(), get_multiline_comment_style(), indent, MAX, NULL, read_indent(), real_comment_multiline(), real_uncomment_multiline(), GeanyEditor::sci, sci_end_undo_action(), sci_get_line_end_position(), sci_get_line_from_position(), sci_get_position_from_line(), sci_get_selection_end(), sci_get_selection_start(), sci_get_style_at(), sci_get_text_range(), sci_scroll_caret(), sci_set_current_position(), sci_set_selection_end(), sci_set_selection_start(), and sci_start_undo_action().
Referenced by on_menu_toggle_line_commentation1_activate().
gint editor_do_uncomment | ( | GeanyEditor * | editor, |
gint | line, | ||
gboolean | toggle | ||
) |
Definition at line 2989 of file editor.c.
References GeanyEditorPrefs::comment_toggle_mark, count, GeanyEditor::document, editor_get_eol_char_len(), editor_get_filetype_at_line(), editor_prefs, EMPTY, GeanyDocument::file_type, filetype_get_comment_open_close(), get_multiline_comment_style(), line, MAX, NULL, real_uncomment_multiline(), GeanyEditor::sci, sci_end_undo_action(), sci_get_line_end_position(), sci_get_line_from_position(), sci_get_position_from_line(), sci_get_selection_end(), sci_get_selection_start(), sci_get_style_at(), sci_get_text_range(), sci_replace_sel(), sci_set_selection(), sci_set_selection_end(), sci_set_selection_start(), and sci_start_undo_action().
Referenced by editor_do_comment_toggle(), and on_menu_uncomment_line1_activate().
void editor_ensure_final_newline | ( | GeanyEditor * | editor | ) |
Definition at line 4580 of file editor.c.
References editor_get_eol_char(), GeanyEditor::sci, sci_get_line_count(), sci_get_position_from_line(), and sci_insert_text().
Referenced by document_save_file().
void editor_finalize | ( | void | ) |
Definition at line 4046 of file editor.c.
References scintilla_release_resources().
Referenced by do_main_quit().
void editor_find_current_word | ( | GeanyEditor * | editor, |
gint | pos, | ||
gchar * | word, | ||
gsize | wordlen, | ||
const gchar * | wc | ||
) |
Definition at line 1740 of file editor.c.
References pos, and read_current_word().
Referenced by editor_get_default_selection(), editor_show_calltip(), on_editor_button_press_event(), on_show_color_chooser1_activate(), and read_current_word().
void editor_find_current_word_sciwc | ( | GeanyEditor * | editor, |
gint | pos, | ||
gchar * | word, | ||
gsize | wordlen | ||
) |
Definition at line 1749 of file editor.c.
References NULL, pos, GeanyEditor::sci, sci_get_current_position(), sci_get_text_range(), sci_word_end_position(), and sci_word_start_position().
Referenced by editor_get_default_selection(), find_usage(), and read_current_word().
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.
editor | Editor or NULL . |
snippet_name | Snippet name. |
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.
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().
gchar * editor_get_calltip_text | ( | GeanyEditor * | editor, |
const TMTag * | tag | ||
) |
Definition at line 2062 of file editor.c.
References append_calltip(), GeanyEditor::document, GeanyDocument::file_type, GeanyFiletype::id, and NULL.
Referenced by get_symbol_tooltip().
gchar * editor_get_default_selection | ( | GeanyEditor * | editor, |
gboolean | use_current_word, | ||
const gchar * | wordchars | ||
) |
Definition at line 4057 of file editor.c.
References editor_find_current_word(), editor_find_current_word_sciwc(), GEANY_MAX_WORD_LENGTH, NULL, GeanyEditor::sci, sci_get_lines_selected(), sci_get_selection_contents(), and wordchars.
Referenced by on_menu_open_selected_file1_activate(), search_find_selection(), search_show_find_dialog(), search_show_find_in_files_dialog_full(), and search_show_replace_dialog().
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".
editor | The editor to operate on, or NULL to query the default value. |
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().
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.
editor | The editor to operate on, or NULL to query the default value. |
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().
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.
editor | The editor to operate on, or NULL to query the default value. |
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().
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.
editor | The editor to operate on, or NULL to query the default value. |
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().
|
static |
Definition at line 2806 of file editor.c.
References GeanyEditor::document, GeanyDocument::file_type, filetypes, filetypes_load_config(), GEANY_FILETYPES_BASIC, GEANY_FILETYPES_HTML, GEANY_FILETYPES_JS, GEANY_FILETYPES_PHP, GEANY_FILETYPES_PYTHON, GeanyFiletype::id, is_style_php(), line, NULL, SCE_HB_DEFAULT, SCE_HB_STRINGEOL, SCE_HBA_DEFAULT, SCE_HBA_STRINGEOL, SCE_HJ_DEFAULT, SCE_HJ_REGEX, SCE_HJA_DEFAULT, SCE_HJA_REGEX, SCE_HP_DEFAULT, SCE_HP_IDENTIFIER, SCE_HPA_DEFAULT, SCE_HPA_IDENTIFIER, SCE_HPHP_COMPLEX_VARIABLE, SCE_HPHP_DEFAULT, SCE_HPHP_OPERATOR, GeanyEditor::sci, sci_get_position_from_line(), and sci_get_style_at().
Referenced by editor_do_comment(), editor_do_comment_toggle(), editor_do_uncomment(), real_comment_multiline(), and real_uncomment_multiline().
const GeanyIndentPrefs * editor_get_indent_prefs | ( | GeanyEditor * | editor | ) |
Gets the indentation prefs for the editor.
Prefs can be different according to project or document.
editor | The editor, or NULL to get the default 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().
|
static |
Definition at line 388 of file editor.c.
References app, editor_prefs, GeanyProjectPrivate::long_line_behaviour, GeanyEditorPrefs::long_line_column, GeanyProjectPrivate::long_line_column, GeanyProject::priv, and GeanyApp::project.
Referenced by editor_apply_update_prefs(), and get_default_prefs().
|
static |
Definition at line 368 of file editor.c.
References app, editor_prefs, GeanyProjectPrivate::long_line_behaviour, GeanyEditorPrefs::long_line_enabled, GeanyEditorPrefs::long_line_type, GeanyProject::priv, and GeanyApp::project.
Referenced by editor_apply_update_prefs(), and get_default_prefs().
const GeanyEditorPrefs * editor_get_prefs | ( | GeanyEditor * | editor | ) |
Definition at line 424 of file editor.c.
References editor_get_indent_prefs(), get_default_prefs(), GeanyEditorPrefs::indentation, and NULL.
Referenced by get_reflow_column().
GType editor_get_type | ( | void | ) |
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.
editor | The editor to operate on. |
pos | The position where the word should be read from. May be -1 to use the current position. |
wordchars | The 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. |
NULL
. Should be freed when no longer needed.Definition at line 1791 of file editor.c.
References GEANY_MAX_WORD_LENGTH, NULL, pos, read_current_word(), and wordchars.
Referenced by autocomplete_scope().
gboolean editor_goto_line | ( | GeanyEditor * | editor, |
gint | line_no, | ||
gint | offset | ||
) |
Definition at line 4701 of file editor.c.
References editor_goto_pos(), pos, GeanyEditor::sci, sci_get_current_line(), sci_get_line_count(), and sci_get_position_from_line().
Referenced by on_go_to_line_activate(), and on_toolbutton_goto_entry_activate().
gboolean editor_goto_next_snippet_cursor | ( | GeanyEditor * | editor | ) |
Definition at line 2557 of file editor.c.
References find_next_snippet_indicator(), GEANY_INDICATOR_SNIPPET, SelectionRange::len, sci, GeanyEditor::sci, sci_indicator_set(), sci_set_selection(), and SelectionRange::start.
Referenced by cb_func_editor_action().
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.
editor | Editor. |
pos | The position. |
mark | Whether to set a mark on the position. |
TRUE
if action has been performed, otherwise FALSE
.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().
|
static |
Definition at line 3454 of file editor.c.
References GeanyEditorPrefs::brace_match_ltgt, brace_timeout_active, delay_match_brace(), editor_prefs, GeanyEditor::sci, SCI_BRACEBADLIGHT, sci_get_char_at(), SCI_SETHIGHLIGHTGUIDE, and utils_isbrace().
Referenced by delay_match_brace(), and on_update_ui().
void editor_indent | ( | GeanyEditor * | editor, |
gboolean | increase | ||
) |
Definition at line 5258 of file editor.c.
References editor_change_line_indent(), editor_select_lines(), line, sci, GeanyEditor::sci, sci_end_undo_action(), sci_get_current_line(), sci_get_current_position(), sci_get_length(), sci_get_line_from_position(), sci_get_line_indent_position(), sci_get_line_length(), sci_get_lines_selected(), sci_get_position_from_line(), sci_get_selection_end(), sci_get_selection_start(), SCI_GETANCHOR, SCI_SETANCHOR, SCI_SETCURRENTPOS, and sci_start_undo_action().
Referenced by on_menu_decrease_indent1_activate(), and on_menu_increase_indent1_activate().
void editor_indentation_by_one_space | ( | GeanyEditor * | editor, |
gint | pos, | ||
gboolean | decrease | ||
) |
Definition at line 3980 of file editor.c.
References count, editor_get_eol_char_len(), MAX, NULL, pos, GeanyEditor::sci, sci_end_undo_action(), sci_get_char_at(), sci_get_line_from_position(), sci_get_selection_end(), sci_get_selection_start(), SCI_GETLINEINDENTPOSITION, sci_insert_text(), SCI_POSITIONFROMLINE, sci_replace_sel(), sci_set_current_position(), sci_set_selection(), sci_set_selection_end(), sci_set_selection_start(), and sci_start_undo_action().
Referenced by cb_func_format_action().
void editor_indicator_clear | ( | GeanyEditor * | editor, |
gint | indic | ||
) |
Deletes all currently set indicators matching indic in the editor window.
editor | The editor to operate on. |
indic | The indicator number to clear, this is a value of GeanyIndicator. |
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().
void editor_indicator_clear_errors | ( | GeanyEditor * | editor | ) |
Definition at line 4133 of file editor.c.
References editor_indicator_clear(), GEANY_INDICATOR_ERROR, GeanyEditor::sci, and sci_marker_delete_all().
Referenced by clear_all_errors().
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.
editor | The editor to operate on. |
indic | The indicator number to use, this is a value of GeanyIndicator. |
line | The line number which should be marked. |
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().
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.
editor | The editor to operate on. |
indic | The indicator number to use, this is a value of GeanyIndicator. |
start | The starting position for the marker. |
end | The ending position for the marker. |
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().
void editor_init | ( | void | ) |
Definition at line 5070 of file editor.c.
References app, GeanyApp::configdir, editor_prefs, geany_object, GeanyEditorPrefs::indentation, NULL, on_document_save(), on_editor_notify(), and ui_add_config_file_menu_item().
Referenced by main_lib().
void editor_insert_alternative_whitespace | ( | GeanyEditor * | editor | ) |
Definition at line 3701 of file editor.c.
References editor_get_indent_prefs(), GEANY_INDENT_TYPE_BOTH, GEANY_INDENT_TYPE_SPACES, GEANY_INDENT_TYPE_TABS, get_whitespace(), NULL, GeanyEditor::sci, sci_add_text(), text, GeanyIndentPrefs::type, and GeanyIndentPrefs::width.
Referenced by cb_func_insert_action().
void editor_insert_color | ( | GeanyEditor * | editor, |
const gchar * | colour | ||
) |
Definition at line 4238 of file editor.c.
References NULL, GeanyEditor::sci, sci_add_text(), sci_get_char_at(), sci_get_selection_end(), sci_get_selection_start(), sci_has_selection(), sci_replace_sel(), sci_set_selection_end(), and sci_set_selection_start().
Referenced by on_color_dialog_response().
void editor_insert_multiline_comment | ( | GeanyEditor * | editor | ) |
Definition at line 3606 of file editor.c.
References GeanyEditor::auto_indent, GeanyFiletype::comment_use_indent, GeanyEditor::document, editor_do_comment(), editor_info, EMPTY, GeanyDocument::file_type, filetype_get_comment_open_close(), indent, line, NULL, pos, read_indent(), GeanyEditor::sci, sci_end_undo_action(), sci_get_line_from_position(), sci_get_position_from_line(), sci_insert_text(), sci_set_anchor(), sci_set_current_position(), sci_set_selection_end(), sci_set_selection_start(), sci_start_undo_action(), and text.
Referenced by insert_multiline_comment().
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.
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().
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.
editor | Editor. |
text | Intended as e.g. "if (foo)\n\tbar();" . |
insert_pos | Document position to insert text at. |
cursor_index | If >= 0, the index into text to place the cursor. |
newline_indent_size | Indentation size (in spaces) to insert for each newline; use -1 to read the indent size from the line with insert_pos on it. |
replace_newlines | Whether to replace newlines. If newlines have been replaced already, this should be false, to avoid errors e.g. on Windows. |
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().
gboolean editor_line_in_view | ( | GeanyEditor * | editor, |
gint | line | ||
) |
Definition at line 4087 of file editor.c.
References line, NULL, GeanyEditor::sci, SCI_GETFIRSTVISIBLELINE, SCI_LINESONSCREEN, SCI_VISIBLEFROMDOCLINE, and SCI_WRAPCOUNT.
Referenced by document_search_bar_find(), and editor_display_current_line().
|
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().
void editor_replace_spaces | ( | GeanyEditor * | editor, |
gboolean | ignore_selection | ||
) |
Definition at line 4453 of file editor.c.
References _, Sci_TextToFind::chrg, Sci_CharacterRange::cpMax, Sci_CharacterRange::cpMin, dialogs_show_input_numeric(), Sci_TextToFind::lpstrText, NULL, SCFIND_MATCHCASE, GeanyEditor::sci, sci_end_undo_action(), sci_find_text(), sci_get_current_position(), sci_get_length(), sci_get_line_from_position(), sci_get_line_indent_position(), sci_get_selection_end(), sci_get_selection_start(), sci_get_tab_width(), SCI_GETANCHOR, sci_has_selection(), sci_replace_target(), sci_set_selection(), sci_set_target_end(), sci_set_target_start(), sci_start_undo_action(), and text.
Referenced by on_replace_spaces_activate().
void editor_replace_tabs | ( | GeanyEditor * | editor, |
gboolean | ignore_selection | ||
) |
Definition at line 4396 of file editor.c.
References Sci_TextToFind::chrg, Sci_CharacterRange::cpMax, Sci_CharacterRange::cpMin, Sci_TextToFind::lpstrText, NULL, SCFIND_MATCHCASE, GeanyEditor::sci, sci_end_undo_action(), sci_find_text(), sci_get_col_from_position(), sci_get_current_position(), sci_get_length(), sci_get_selection_end(), sci_get_selection_start(), sci_get_tab_width(), SCI_GETANCHOR, sci_has_selection(), sci_replace_target(), sci_set_selection(), sci_set_target_end(), sci_set_target_start(), and sci_start_undo_action().
Referenced by document_save_file(), and on_replace_tabs_activate().
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().
void editor_scroll_to_line | ( | GeanyEditor * | editor, |
gint | line, | ||
gfloat | percent_of_view | ||
) |
Definition at line 3674 of file editor.c.
References line, NULL, GeanyEditor::sci, sci_get_current_line(), SCI_LINESONSCREEN, sci_scroll_caret(), SCI_SETFIRSTVISIBLELINE, and SCI_VISIBLEFROMDOCLINE.
Referenced by cb_func_editor_action(), document_search_bar_find(), fold_all(), and on_editor_notify().
void editor_select_indent_block | ( | GeanyEditor * | editor | ) |
Definition at line 3887 of file editor.c.
References find_block_stop(), NULL, GeanyEditor::sci, sci_get_current_line(), SCI_POSITIONFROMLINE, and sci_set_selection().
Referenced by join_paragraph(), and reflow_paragraph().
void editor_select_lines | ( | GeanyEditor * | editor, |
gboolean | extra_line | ||
) |
Definition at line 3752 of file editor.c.
References line, NULL, GeanyEditor::sci, sci_get_col_from_position(), sci_get_line_from_position(), sci_get_position_from_line(), sci_get_selection_end(), sci_get_selection_start(), and sci_set_selection().
Referenced by cb_func_select_action(), delete_lines(), duplicate_lines(), editor_indent(), and tools_execute_custom_command().
void editor_select_paragraph | ( | GeanyEditor * | editor | ) |
Definition at line 3824 of file editor.c.
References find_paragraph_stop(), NULL, GeanyEditor::sci, sci_get_current_line(), SCI_POSITIONFROMLINE, and sci_set_selection().
Referenced by cb_func_select_action().
void editor_select_word | ( | GeanyEditor * | editor | ) |
Definition at line 3724 of file editor.c.
References NULL, pos, GeanyEditor::sci, SCI_GETCURRENTPOS, sci_set_selection(), sci_word_end_position(), and sci_word_start_position().
Referenced by cb_func_select_action().
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().
void editor_set_indent | ( | GeanyEditor * | editor, |
GeanyIndentType | type, | ||
gint | width | ||
) |
Definition at line 4668 of file editor.c.
References _, editor_get_indent_prefs(), GEANY_INDENT_TYPE_BOTH, GEANY_INDENT_TYPE_SPACES, GEANY_INDENT_TYPE_TABS, GeanyIndentPrefs::hard_tab_width, GeanyEditor::indent_type, GeanyEditor::indent_width, sci, GeanyEditor::sci, sci_set_tab_width(), sci_set_use_tabs(), SCI_SETBACKSPACEUNINDENTS, SCI_SETINDENT, and ui_set_statusbar().
Referenced by document_apply_indent_settings(), document_clone(), document_open_file_full(), editor_apply_update_prefs(), editor_create_widget(), editor_set_indent_type(), editor_set_indent_width(), open_session_file(), and set_indent_type().
void editor_set_indent_type | ( | GeanyEditor * | editor, |
GeanyIndentType | type | ||
) |
Sets the indent type for editor.
editor | Editor. |
type | Indent type. |
Definition at line 4649 of file editor.c.
References editor_set_indent(), and GeanyEditor::indent_width.
Referenced by on_detect_type_from_file_activate().
void editor_set_indent_width | ( | GeanyEditor * | editor, |
gint | width | ||
) |
Sets the indent width for editor.
editor | Editor. |
width | New indent width. |
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().
void editor_set_indentation_guides | ( | GeanyEditor * | editor | ) |
Definition at line 5091 of file editor.c.
References editor_prefs, NULL, SC_IV_LOOKBOTH, SC_IV_LOOKFORWARD, SC_IV_NONE, SC_IV_REAL, GeanyEditor::sci, sci_get_lexer(), sci_set_indentation_guides(), SCLEX_ASM, SCLEX_BASH, SCLEX_CAML, SCLEX_COBOL, SCLEX_CPP, SCLEX_CSS, SCLEX_D, SCLEX_DIFF, SCLEX_F77, SCLEX_FORTRAN, SCLEX_FREEBASIC, SCLEX_HASKELL, SCLEX_HTML, SCLEX_LATEX, SCLEX_LUA, SCLEX_MAKEFILE, SCLEX_OCTAVE, SCLEX_PASCAL, SCLEX_PERL, SCLEX_PHPSCRIPT, SCLEX_PROPERTIES, SCLEX_PYTHON, SCLEX_RUBY, SCLEX_RUST, SCLEX_SQL, SCLEX_TCL, SCLEX_VHDL, SCLEX_XML, and GeanyEditorPrefs::show_indent_guide.
Referenced by document_load_config(), editor_apply_update_prefs(), and ui_toggle_editor_features().
void editor_set_line_wrapping | ( | GeanyEditor * | editor, |
gboolean | wrap | ||
) |
Definition at line 4633 of file editor.c.
References GeanyEditor::line_wrapping, NULL, GeanyEditor::sci, and sci_set_lines_wrapped().
Referenced by on_line_wrapping1_toggled(), and open_session_file().
gboolean editor_show_calltip | ( | GeanyEditor * | editor, |
gint | pos | ||
) |
Definition at line 1994 of file editor.c.
References calltip, GeanyEditor::document, editor_find_current_word(), GeanyDocument::file_type, find_calltip(), find_previous_brace(), find_start_bracket(), GEANY_MAX_WORD_LENGTH, highlighting_is_code_style(), NULL, pos, sci, GeanyEditor::sci, SCI_CALLTIPSHOW, sci_find_matching_brace(), sci_get_char_at(), sci_get_current_position(), sci_get_lexer(), sci_get_style_at(), SCLEX_LATEX, and utils_wrap_string().
Referenced by cb_func_editor_action(), on_char_added(), and on_editor_notify().
void editor_smart_line_indentation | ( | GeanyEditor * | editor | ) |
Definition at line 3938 of file editor.c.
References editor_get_eol_char_len(), MAX, NULL, sci, GeanyEditor::sci, sci_end_undo_action(), sci_get_line_from_position(), sci_get_position_from_line(), sci_get_selection_end(), sci_get_selection_start(), SCI_GETLINEINDENTPOSITION, sci_set_current_position(), sci_set_selection_end(), sci_set_selection_start(), sci_start_undo_action(), and smart_line_indentation().
Referenced by cb_func_format_action().
void editor_snippets_free | ( | void | ) |
Definition at line 110 of file editor.c.
References main_widgets, snippet_accel_group, snippet_hash, and GeanyMainWidgets::window.
Referenced by do_main_quit(), main_reload_configuration(), and on_document_save().
void editor_snippets_init | ( | void | ) |
Definition at line 258 of file editor.c.
References app, GeanyApp::configdir, GeanyApp::datadir, load_kb(), main_widgets, NULL, SETPTR, snippet_accel_group, snippets_load(), and GeanyMainWidgets::window.
Referenced by main_lib(), main_reload_configuration(), and on_document_save().
gboolean editor_start_auto_complete | ( | GeanyEditor * | editor, |
gint | pos, | ||
gboolean | force | ||
) |
Definition at line 2221 of file editor.c.
References GeanyEditorPrefs::auto_complete_symbols, autocomplete_check_html(), autocomplete_doc_word(), GeanyEditorPrefs::autocomplete_doc_words, autocomplete_scope(), autocomplete_scope_shown, autocomplete_tags(), GeanyEditor::document, editor_prefs, GeanyDocument::file_type, GEANY_FILETYPES_CSS, GEANY_FILETYPES_LATEX, GEANY_FILETYPES_PHP, GEANY_MAX_WORD_LENGTH, GEANY_WORDCHARS, highlighting_is_code_style(), GeanyFiletype::id, NULL, pos, read_current_word(), SCE_HPHP_DEFAULT, sci, GeanyEditor::sci, SCI_AUTOCACTIVE, SCI_AUTOCCANCEL, sci_get_char_at(), sci_get_lexer(), sci_get_style_at(), sci_send_command(), GeanyEditorPrefs::symbolcompletion_min_chars, utils_beep(), and wordchars.
Referenced by cb_func_editor_action(), and on_char_added().
void editor_strip_line_trailing_spaces | ( | GeanyEditor * | editor, |
gint | line | ||
) |
Definition at line 4522 of file editor.c.
References GeanyEditor::document, GeanyDocument::file_type, GEANY_FILETYPES_DIFF, GeanyFiletype::id, line, GeanyEditor::sci, sci_get_char_at(), sci_get_line_end_position(), sci_get_position_from_line(), sci_replace_target(), sci_set_target_end(), and sci_set_target_start().
Referenced by editor_strip_trailing_spaces(), join_lines(), on_new_line_added(), and reflow_lines().
void editor_strip_trailing_spaces | ( | GeanyEditor * | editor, |
gboolean | ignore_selection | ||
) |
Definition at line 4547 of file editor.c.
References editor_strip_line_trailing_spaces(), line, GeanyEditor::sci, sci_end_undo_action(), sci_get_col_from_position(), sci_get_line_count(), sci_get_line_from_position(), sci_get_selection_end(), sci_get_selection_start(), sci_has_selection(), and sci_start_undo_action().
Referenced by cb_func_document_action(), document_save_file(), and on_strip_trailing_spaces1_activate().
void editor_toggle_fold | ( | GeanyEditor * | editor, |
gint | line, | ||
gint | modifiers | ||
) |
Definition at line 441 of file editor.c.
References editor_prefs, line, NULL, SC_FOLDACTION_TOGGLE, SC_FOLDLEVELBASE, SC_FOLDLEVELHEADERFLAG, SC_FOLDLEVELNUMBERMASK, sci, GeanyEditor::sci, SCI_FOLDCHILDREN, SCI_FOLDLINE, sci_get_first_visible_line(), sci_get_fold_level(), sci_get_fold_parent(), SCI_SETFIRSTVISIBLELINE, SCI_VISIBLEFROMDOCLINE, SCMOD_SHIFT, and GeanyEditorPrefs::unfold_all_children.
Referenced by cb_func_document_action(), and on_margin_click().
void editor_unfold_all | ( | GeanyEditor * | editor | ) |
Definition at line 4384 of file editor.c.
References fold_all().
Referenced by cb_func_document_action(), on_menu_unfold_all1_activate(), and on_prefs_dialog_response().
|
static |
Definition at line 974 of file editor.c.
References line, MAX, sci, SCI_ENSUREVISIBLE, SCI_ENSUREVISIBLEENFORCEPOLICY, and sci_get_line_from_position().
Referenced by on_editor_notify().
|
static |
Definition at line 878 of file editor.c.
References expand(), line, SC_FOLDLEVELHEADERFLAG, SC_FOLDLEVELNUMBERMASK, sci, sci_get_fold_expanded(), SCI_GETFOLDLEVEL, SCI_GETLASTCHILD, SCI_HIDELINES, SCI_SETFOLDEXPANDED, and SCI_SHOWLINES.
Referenced by expand(), fold_changed(), on_expand_collapse(), on_openfiles_expand_collapse(), and update_tree_tags().
|
static |
Definition at line 3847 of file editor.c.
References line, sci, GeanyEditor::sci, sci_get_line_count(), sci_get_line_indentation(), and sci_is_blank_line().
Referenced by editor_select_indent_block().
|
static |
Definition at line 1895 of file editor.c.
References append_calltip(), TMTag::arglist, calltip, FILETYPE_ID, GEANY_FILETYPES_D, GeanyFiletype::id, GeanyFiletype::lang, TMTag::name, NULL, TM_TAG, tm_tag_attr_arglist_t, tm_tag_attr_name_t, tm_tag_attr_scope_t, tm_tag_class_t, tm_tag_function_t, tm_tag_macro_with_arg_t, tm_tag_max_t, tm_tag_method_t, tm_tag_prototype_t, tm_tag_struct_t, tm_tags_prune(), tm_tags_sort(), tm_workspace_find(), TMTag::type, and utils_str_equal().
Referenced by editor_show_calltip().
|
static |
Definition at line 2887 of file editor.c.
References Sci_TextToFind::chrg, Sci_CharacterRange::cpMax, Sci_CharacterRange::cpMin, Sci_TextToFind::lpstrText, sci, sci_find_text(), sci_get_current_position(), sci_get_length(), sci_get_style_at(), and text.
Referenced by real_uncomment_multiline().
|
static |
Definition at line 2530 of file editor.c.
References GEANY_INDICATOR_SNIPPET, SelectionRange::len, pos, sci, GeanyEditor::sci, sci_get_current_position(), sci_get_length(), SCI_INDICATOREND, SCI_INDICATORVALUEAT, and SelectionRange::start.
Referenced by editor_goto_next_snippet_cursor().
|
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().
|
static |
Definition at line 1815 of file editor.c.
References GeanyEditorPrefs::brace_match_ltgt, editor_prefs, pos, sci, sci_get_char_at(), and utils_is_opening_brace().
Referenced by editor_show_calltip().
|
static |
Definition at line 1830 of file editor.c.
References pos, sci, and sci_get_char_at().
Referenced by editor_show_calltip().
|
static |
Definition at line 2357 of file editor.c.
References editor_get_indent_prefs(), GEANY_INDENT_TYPE_SPACES, GEANY_INDENT_TYPE_TABS, NULL, GeanyEditor::sci, sci_get_tab_width(), SETPTR, GeanyIndentPrefs::type, utils_string_regex_replace_all(), utils_string_replace_all(), and GeanyIndentPrefs::width.
Referenced by editor_insert_text_block().
|
static |
Definition at line 4360 of file editor.c.
References editor_prefs, editor_scroll_to_line(), GeanyEditorPrefs::folding, lines, NULL, SC_FOLDLEVELHEADERFLAG, GeanyEditor::sci, sci_get_first_visible_line(), sci_get_fold_expanded(), sci_get_fold_level(), sci_get_line_count(), and sci_toggle_fold().
Referenced by editor_fold_all(), and editor_unfold_all().
|
static |
Definition at line 932 of file editor.c.
References expand(), line, SC_FOLDLEVELHEADERFLAG, SC_FOLDLEVELNUMBERMASK, SC_FOLDLEVELWHITEFLAG, sci, sci_get_fold_expanded(), sci_get_fold_parent(), sci_get_line_is_visible(), SCI_GETALLLINESVISIBLE, SCI_SETFOLDEXPANDED, and SCI_SHOWLINES.
Referenced by on_editor_notify().
G_DEFINE_BOXED_TYPE | ( | GeanyEditor | , |
editor | , | ||
copy_ | , | ||
free_ | |||
) |
|
static |
Definition at line 1366 of file editor.c.
References count, highlighting_is_code_style(), line, pos, sci, sci_get_char_at(), sci_get_lexer(), sci_get_line_end_position(), sci_get_position_from_line(), and sci_get_style_at().
Referenced by get_indent_size_after_line().
|
static |
Definition at line 1250 of file editor.c.
References app, editor_prefs, GeanyEditorPrefs::indentation, GeanyProjectPrivate::indentation, GeanyProject::priv, and GeanyApp::project.
Referenced by editor_create(), editor_create_widget(), and editor_get_indent_prefs().
|
static |
Definition at line 401 of file editor.c.
References GeanyEditorPrefs::auto_continue_multiline, editor_get_indent_prefs(), editor_get_long_line_column(), editor_get_long_line_type(), editor_prefs, get_project_pref, GeanyEditorPrefs::indentation, GeanyEditorPrefs::line_break_column, GeanyEditorPrefs::line_wrapping, GeanyEditorPrefs::long_line_column, GeanyEditorPrefs::long_line_type, and NULL.
Referenced by editor_get_prefs().
|
static |
Definition at line 2133 of file editor.c.
References GeanyEditorPrefs::autocompletion_max_entries, Sci_TextToFind::chrg, Sci_TextToFind::chrgText, Sci_CharacterRange::cpMax, Sci_CharacterRange::cpMin, editor_prefs, Sci_TextToFind::lpstrText, NULL, SCFIND_MATCHCASE, SCFIND_WORDSTART, sci, SCI_FINDTEXT, sci_get_contents_range(), sci_get_current_position(), sci_get_length(), sci_word_end_position(), and utils_str_casecmp().
Referenced by autocomplete_doc_word().
|
static |
Definition at line 1463 of file editor.c.
References GeanyIndentPrefs::auto_indent_mode, GeanyEditor::document, editor_get_indent_prefs(), GeanyDocument::file_type, GEANY_AUTOINDENT_BASIC, get_brace_indent(), get_python_indent(), get_xml_indent(), lexer_has_braces(), line, GeanyFiletype::priv, sci, GeanyEditor::sci, sci_get_lexer(), sci_get_line_indentation(), SCLEX_HTML, SCLEX_PYTHON, SCLEX_XML, GeanyIndentPrefs::width, and GeanyFiletypePrivate::xml_indent_tags.
Referenced by insert_indent_after_line().
|
static |
Definition at line 2951 of file editor.c.
References is_style_php(), SCE_C_COMMENT, SCE_CAML_COMMENT, SCE_CSS_COMMENT, SCE_D_COMMENT, SCE_H_COMMENT, SCE_HA_COMMENTBLOCK, SCE_HPHP_COMMENT, SCE_LUA_COMMENT, SCE_PAS_COMMENT, SCE_RUST_COMMENTBLOCK, SCE_SQL_COMMENT, GeanyEditor::sci, sci_get_lexer(), sci_get_style_at(), SCLEX_CAML, SCLEX_CSS, SCLEX_D, SCLEX_HASKELL, SCLEX_HTML, SCLEX_LITERATEHASKELL, SCLEX_LUA, SCLEX_PASCAL, SCLEX_PHPSCRIPT, SCLEX_RUST, SCLEX_SQL, and SCLEX_XML.
Referenced by editor_do_comment(), editor_do_comment_toggle(), and editor_do_uncomment().
|
static |
Definition at line 1411 of file editor.c.
References get_sci_line_code_end_position(), line, SCE_P_OPERATOR, sci, sci_get_char_at(), and sci_get_style_at().
Referenced by get_indent_size_after_line().
|
static |
Definition at line 1393 of file editor.c.
References highlighting_is_code_style(), line, pos, sci, sci_get_char_at(), sci_get_lexer(), sci_get_line_end_position(), sci_get_position_from_line(), and sci_get_style_at().
Referenced by get_python_indent(), and get_xml_indent().
|
static |
Definition at line 1206 of file editor.c.
References GEANY_INDENT_TYPE_BOTH, GeanyIndentPrefs::hard_tab_width, GeanyIndentPrefs::type, and GeanyIndentPrefs::width.
Referenced by get_whitespace().
|
static |
Definition at line 1220 of file editor.c.
References GEANY_INDENT_TYPE_SPACES, get_tab_width(), NULL, tabs, and GeanyIndentPrefs::type.
Referenced by close_block(), editor_insert_alternative_whitespace(), and insert_indent_after_line().
|
static |
Definition at line 1425 of file editor.c.
References EMPTY, get_sci_line_code_end_position(), line, pos, SCE_H_TAG, SCE_H_TAGUNKNOWN, sci, sci_get_char_at(), sci_get_contents_range(), sci_get_current_position(), sci_get_lexer(), sci_get_position_from_line(), sci_get_style_at(), SCLEX_HTML, utils_find_open_xml_tag(), and utils_is_short_html_tag().
Referenced by get_indent_size_after_line().
|
static |
Definition at line 2722 of file editor.c.
References GeanyEditorPrefs::auto_close_xml_tags, editor_prefs, EMPTY, highlighting_is_string_style(), insert_closing_tag(), pos, SCE_H_XCCOMMENT, sci, GeanyEditor::sci, sci_get_char_at(), sci_get_lexer(), sci_get_style_at(), sci_get_text_range(), SCLEX_HTML, SCLEX_XML, utils_find_open_xml_tag(), and utils_is_short_html_tag().
Referenced by on_char_added().
|
static |
Definition at line 3478 of file editor.c.
References SCE_C_COMMENT, SCE_C_COMMENTDOC, SCE_CSS_COMMENT, SCE_D_COMMENT, SCE_D_COMMENTDOC, SCE_D_COMMENTNESTED, SCE_HPHP_COMMENT, SCE_PAS_COMMENT, SCE_PAS_COMMENT2, SCE_RUST_COMMENTBLOCK, SCE_RUST_COMMENTBLOCKDOC, SCLEX_COBOL, SCLEX_CPP, SCLEX_CSS, SCLEX_D, SCLEX_HTML, SCLEX_PASCAL, SCLEX_PHPSCRIPT, and SCLEX_RUST.
Referenced by auto_multiline().
|
static |
Definition at line 2690 of file editor.c.
References NULL, pos, sci, GeanyEditor::sci, sci_end_undo_action(), sci_get_char_at(), sci_replace_sel(), sci_set_selection(), and sci_start_undo_action().
Referenced by handle_xml().
|
static |
Definition at line 1499 of file editor.c.
References editor_get_indent_prefs(), GEANY_INDENT_TYPE_TABS, get_indent_size_after_line(), get_whitespace(), line, sci, GeanyEditor::sci, sci_add_text(), sci_get_contents_range(), sci_get_line_indent_position(), sci_get_line_indentation(), sci_get_position_from_line(), text, and GeanyIndentPrefs::type.
Referenced by on_new_line_added().
|
static |
|
static |
Definition at line 356 of file editor.c.
References SCE_HPHP_COMPLEX_VARIABLE, SCE_HPHP_DEFAULT, and SCE_HPHP_OPERATOR.
Referenced by autocomplete_check_html(), editor_get_filetype_at_line(), and get_multiline_comment_style().
|
static |
Definition at line 1316 of file editor.c.
References sci, sci_get_lexer(), SCLEX_BASH, SCLEX_CPP, SCLEX_D, SCLEX_HTML, SCLEX_PASCAL, SCLEX_PERL, SCLEX_PHPSCRIPT, SCLEX_R, SCLEX_RUST, and SCLEX_TCL.
Referenced by close_block(), and get_indent_size_after_line().
|
static |
Definition at line 239 of file editor.c.
References add_kb(), foreach_strv, NULL, and ptr.
Referenced by editor_snippets_init().
|
static |
Definition at line 644 of file editor.c.
References pos, sci, and sci_get_text_range().
Referenced by autocomplete_scope().
|
static |
Definition at line 801 of file editor.c.
References auto_close_chars(), GeanyEditor::auto_indent, calltip, SCNotification::ch, check_line_breaking(), close_block(), editor_show_calltip(), editor_start_auto_complete(), handle_xml(), NULL, on_new_line_added(), pos, request_reshowing_calltip(), SC_EOL_CR, sci, GeanyEditor::sci, SCI_CALLTIPACTIVE, SCI_CALLTIPCANCEL, sci_get_current_position(), and sci_get_eol_mode().
Referenced by on_editor_notify().
|
static |
Definition at line 5036 of file editor.c.
References app, GeanyApp::configdir, editor_snippets_free(), editor_snippets_init(), NULL, GeanyDocument::real_path, and utils_str_equal().
Referenced by editor_init().
|
static |
Definition at line 289 of file editor.c.
References current_word, GeanyEditorPrefs::disable_dnd, GeanyEditor::document, document_check_disk_status(), editor_find_current_word(), editor_info, GeanyMainWidgets::editor_menu, editor_prefs, GEANY_KEY_GROUP_GOTO, GEANY_KEYS_GOTO_MATCHINGBRACE, geany_object, GEANY_PRIMARY_MOD_MASK, keybindings_get_modifiers(), keybindings_send_command(), main_widgets, NULL, GeanyEditor::sci, sci_get_current_position(), sci_get_position_from_xy(), sci_get_selection_start(), sci_has_selection(), sci_set_current_position(), sci_set_selection_end(), symbols_goto_tag(), ui_update_insert_include_item(), ui_update_popup_copy_items(), and ui_update_popup_goto_items().
Referenced by create_new_sci().
|
static |
Definition at line 4816 of file editor.c.
References editor_check_colourise().
Referenced by create_new_sci().
|
static |
Definition at line 4807 of file editor.c.
References editor_check_colourise().
Referenced by create_new_sci().
|
static |
Definition at line 1076 of file editor.c.
References auto_update_margin_width(), autocomplete_scope_shown, calltip, Sci_NotifyHeader::code, GeanyEditor::document, document_open_file_list(), document_set_text_changed(), document_undo_add(), document_update_tag_list_in_idle(), editor_prefs, editor_scroll_to_line(), editor_show_calltip(), ensure_range_visible(), fold_changed(), GeanyEditorPrefs::folding, SCNotification::foldLevelNow, SCNotification::foldLevelPrev, ignore_callback, SCNotification::length, SCNotification::line, SCNotification::linesAdded, SCNotification::listType, SCNotification::modificationType, SCNotification::nmhdr, NULL, on_char_added(), on_margin_click(), on_update_ui(), SCNotification::position, request_reshowing_calltip(), SC_MOD_CHANGEFOLD, SC_MOD_DELETETEXT, SC_MOD_INSERTTEXT, SC_STARTACTION, sci, GeanyEditor::sci, sci_add_text(), sci_cancel(), SCN_AUTOCCANCELLED, SCN_AUTOCSELECTION, SCN_CALLTIPCLICK, SCN_CHARADDED, SCN_MARGINCLICK, SCN_MODIFIED, SCN_MODIFYATTEMPTRO, SCN_NEEDSHOWN, SCN_PAINTED, SCN_SAVEPOINTLEFT, SCN_SAVEPOINTREACHED, SCN_UPDATEUI, SCN_URIDROPPED, SCN_USERLISTSELECTION, SCN_ZOOM, GeanyEditor::scroll_percent, GeanyEditorPrefs::show_linenumber_margin, SCNotification::text, UNDO_SCINTILLA, update_margins(), and utils_beep().
Referenced by editor_init().
|
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().
|
static |
Definition at line 482 of file editor.c.
References editor_prefs, editor_toggle_fold(), GeanyEditorPrefs::folding, line, SCNotification::margin, SCNotification::modifiers, SCNotification::position, GeanyEditor::sci, sci_get_line_from_position(), and sci_toggle_marker_at_line().
Referenced by on_editor_notify().
|
static |
Definition at line 1293 of file editor.c.
References GeanyEditor::auto_indent, auto_multiline(), editor_prefs, editor_strip_line_trailing_spaces(), get_project_pref, insert_indent_after_line(), line, GeanyEditorPrefs::newline_strip, sci, GeanyEditor::sci, and sci_get_current_line().
Referenced by on_char_added().
|
static |
Definition at line 183 of file editor.c.
References document_get_current(), GeanyDocument::editor, editor_insert_snippet(), GeanyDocument::file_type, GeanyFiletype::name, NULL, GeanyEditor::sci, sci_get_current_position(), sci_scroll_caret(), snippet_hash, snippets_find_completion_by_name(), and utils_beep().
Referenced by add_kb().
|
static |
Definition at line 501 of file editor.c.
References GeanyEditor::document, editor_highlight_braces(), pos, SC_UPDATE_CONTENT, SC_UPDATE_SELECTION, sci, GeanyEditor::sci, sci_get_current_position(), sci_get_style_at(), SCI_GETSELECTIONEND, SCI_GETSELECTIONSTART, SCI_STYLESETBACK, SCI_STYLESETFORE, STYLE_DEFAULT, ui_update_popup_reundo_items(), and ui_update_statusbar().
Referenced by on_editor_notify().
|
static |
Definition at line 1005 of file editor.c.
References pos, sci, sci_get_current_position(), sci_insert_text(), sci_set_current_position(), and text.
Referenced by check_partial_completion().
|
static |
Definition at line 1688 of file editor.c.
References GEANY_WORDCHARS, IS_ASCII, line, NULL, pos, sci, GeanyEditor::sci, sci_get_current_position(), sci_get_line(), sci_get_line_from_position(), and sci_get_position_from_line().
Referenced by autocomplete_check_html(), check_partial_completion(), editor_find_current_word(), editor_get_word_at_pos(), editor_read_word_stem(), and editor_start_auto_complete().
|
static |
Definition at line 1342 of file editor.c.
References indent, line, pos, sci, GeanyEditor::sci, sci_get_line(), sci_get_line_from_position(), and sci_get_line_length().
Referenced by editor_do_comment_toggle(), editor_insert_multiline_comment(), and smart_line_indentation().
|
static |
Definition at line 2858 of file editor.c.
References GeanyEditor::document, editor_get_eol_char(), editor_get_filetype_at_line(), GeanyDocument::file_type, filetype_get_comment_open_close(), NULL, GeanyEditor::sci, sci_get_position_from_line(), and sci_insert_text().
Referenced by editor_do_comment(), and editor_do_comment_toggle().
|
static |
Definition at line 2915 of file editor.c.
References GeanyEditor::document, editor_get_filetype_at_line(), GeanyDocument::file_type, filetype_get_comment_open_close(), find_in_current_style(), NULL, GeanyEditor::sci, sci_delete_line(), SCI_DELETERANGE, sci_get_current_line(), sci_get_line_from_position(), and sci_is_blank_line().
Referenced by editor_do_comment_toggle(), and editor_do_uncomment().
|
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().
|
static |
Definition at line 2407 of file editor.c.
References CURSOR_PLACEHOLDER, geany_cursor_marker, SelectionRange::len, NULL, SelectionRange::start, and utils_string_find().
Referenced by editor_insert_text_block().
|
static |
Definition at line 679 of file editor.c.
References calltip, NULL, and reshow_calltip().
Referenced by on_char_added(), and on_editor_notify().
|
static |
Definition at line 660 of file editor.c.
References calltip, document_get_current(), GeanyDocument::editor, NULL, GeanyEditor::sci, SCI_CALLTIPCANCEL, and SCI_CALLTIPSHOW.
Referenced by request_reshowing_calltip().
|
static |
Definition at line 2907 of file editor.c.
References line, sci, SCI_DELETERANGE, sci_get_line_length(), and sci_get_position_from_line().
Referenced by real_uncomment_multiline().
|
static |
Definition at line 3777 of file editor.c.
References line, sci, sci_get_line_end_position(), and sci_get_line_indent_position().
Referenced by find_block_stop(), find_paragraph_stop(), and real_uncomment_multiline().
|
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().
|
static |
Definition at line 4827 of file editor.c.
References editor_prefs, sci, sci_assign_cmdkey(), sci_clear_cmdkey(), SCI_DELWORDRIGHTEND, SCI_LINESCROLLDOWN, SCI_LINESCROLLUP, SCI_PARADOWN, SCI_PARADOWNEXTEND, SCI_PARAUP, SCI_PARAUPEXTEND, SCI_WORDRIGHTEND, SCI_WORDRIGHTENDEXTEND, SCK_BACK, SCK_DELETE, SCK_DOWN, SCK_END, SCK_HOME, SCK_RIGHT, SCK_UP, SCMOD_ALT, SCMOD_CTRL, SCMOD_SHIFT, and GeanyEditorPrefs::use_gtk_word_boundaries.
Referenced by create_new_sci().
|
static |
Definition at line 591 of file editor.c.
References calltip, sci, SCI_AUTOCCANCEL, SCI_AUTOCSHOW, SCI_CALLTIPACTIVE, and sci_send_command().
Referenced by autocomplete_doc_word(), and show_tags_list().
|
static |
Definition at line 606 of file editor.c.
References TMTag::arglist, GeanyEditorPrefs::autocompletion_max_entries, editor_prefs, EMPTY, TMTag::name, sci, GeanyEditor::sci, and show_autocomplete().
Referenced by autocomplete_scope(), and autocomplete_tags().
|
static |
Definition at line 3909 of file editor.c.
References indent, read_indent(), GeanyEditor::sci, sci_get_position_from_line(), SCI_GETLINEINDENTATION, SCI_GETLINEINDENTPOSITION, sci_insert_text(), SCI_POSITIONFROMLINE, sci_replace_sel(), and sci_set_selection().
Referenced by editor_smart_line_indentation().
|
static |
Definition at line 2601 of file editor.c.
References GeanyEditor::document, editor_insert_snippet(), GeanyDocument::file_type, filetypes, GeanyFiletype::id, name, NULL, pos, sci, GeanyEditor::sci, sci_replace_sel(), sci_scroll_caret(), sci_set_selection_end(), sci_set_selection_start(), and snippets_find_completion_by_name().
Referenced by editor_complete_snippet().
|
static |
Definition at line 2313 of file editor.c.
References name, NULL, and snippet_hash.
Referenced by editor_complete_snippet(), on_snippet_keybinding_activate(), and snippets_complete_constructs().
|
static |
Definition at line 117 of file editor.c.
References NULL, snippet_hash, and utils_get_setting_string().
Referenced by editor_snippets_init().
|
static |
Definition at line 2575 of file editor.c.
References GeanyEditor::document, GeanyDocument::file_name, GeanyDocument::file_type, geany_cursor_marker, NULL, snippet_hash, snippets_replace_specials(), templates_replace_common(), templates_replace_valist(), and utils_string_replace_all().
Referenced by editor_insert_snippet().
|
static |
Definition at line 2342 of file editor.c.
References NULL, and utils_string_replace_all().
Referenced by snippets_make_replacements().
|
static |
Definition at line 1068 of file editor.c.
References editor_prefs, GeanyEditorPrefs::folding, sci, sci_set_folding_margin_visible(), sci_set_line_numbers(), sci_set_symbol_margin(), GeanyEditorPrefs::show_linenumber_margin, and GeanyEditorPrefs::show_markers_margin.
Referenced by editor_set_font(), and on_editor_notify().
|
static |
Definition at line 69 of file editor.c.
Referenced by autocomplete_scope(), editor_start_auto_complete(), and on_editor_notify().
|
static |
Definition at line 3404 of file editor.c.
Referenced by delay_match_brace(), and editor_highlight_braces().
struct { ... } calltip |
|
static |
Definition at line 74 of file editor.c.
Referenced by check_partial_completion(), and on_editor_button_press_event().
EditorInfo editor_info = {current_word, -1} |
Definition at line 79 of file editor.c.
Referenced by editor_insert_multiline_comment(), find_usage(), get_current_word_or_sel(), goto_tag(), insert_multiline_comment(), on_comments_bsd_activate(), on_comments_gpl_activate(), on_comments_multiline_activate(), on_context_action1_activate(), on_editor_button_press_event(), on_popup_insert_date_activate(), on_popup_insert_include_activate(), and read_current_word().
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().
|
static |
Definition at line 71 of file editor.c.
Referenced by editor_insert_text_block(), replace_cursor_markers(), and snippets_make_replacements().
|
static |
Definition at line 91 of file editor.c.
Referenced by checkIndent(), constructParentString(), CreateIndentation(), Scintilla::EditView::DrawAnnotation(), editor_do_comment_toggle(), editor_insert_multiline_comment(), findPythonTags(), Scintilla::Document::GetLineIndentation(), HaskellIndentAmount(), Scintilla::Accessor::IndentAmount(), LexerHaskell::IndentAmountWithOffset(), make_comment_block(), printKind(), printKinds(), read_indent(), Scintilla::Editor::RealizeVirtualSpace(), reflow_lines(), sci_set_line_indentation(), Scintilla::Document::SetLineIndentation(), and smart_line_indentation().
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().
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().
gboolean set |
Definition at line 84 of file editor.c.
Referenced by add_stock_icons(), bitset_not(), get_style(), new_styleset(), on_sci_notify(), re_node_set_alloc(), re_node_set_init_1(), re_node_set_init_2(), re_node_set_insert(), re_node_set_insert_last(), re_node_set_remove_at(), sci_set_folding_margin_visible(), sci_set_line_numbers(), sci_set_lines_wrapped(), sci_set_scroll_stop_at_last_line(), sci_set_symbol_margin(), sci_set_tab_indents(), sci_set_undo_collection(), sci_set_use_tabs(), sci_set_visible_eols(), sci_set_visible_white_spaces(), sci_toggle_marker_at_line(), set_line_numbers(), Scintilla::Document::SetReadOnly(), Scintilla::CellBuffer::SetReadOnly(), and ui_widget_set_sensitive().
|
static |
Definition at line 68 of file editor.c.
Referenced by add_kb(), editor_snippets_free(), and editor_snippets_init().
|
static |
Definition at line 67 of file editor.c.
Referenced by editor_find_snippet(), editor_snippets_free(), on_snippet_keybinding_activate(), snippets_find_completion_by_name(), snippets_load(), and snippets_make_replacements().
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().