From 354928b525a641d31a54d360616afda397fd08cf Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Thu, 3 Feb 2011 23:19:02 -0800 Subject: [PATCH 1/4] Keep these files in mercurial, they are needed to bootstrap the build --- moo/mooedit/mooedit-enum-types.c | 279 +++++++++++++++++++++++++++++++ moo/mooedit/mooedit-enum-types.h | 64 +++++++ 2 files changed, 343 insertions(+) create mode 100644 moo/mooedit/mooedit-enum-types.c create mode 100644 moo/mooedit/mooedit-enum-types.h diff --git a/moo/mooedit/mooedit-enum-types.c b/moo/mooedit/mooedit-enum-types.c new file mode 100644 index 00000000..5ea4d97b --- /dev/null +++ b/moo/mooedit/mooedit-enum-types.c @@ -0,0 +1,279 @@ + +/* Generated data (by glib-mkenums) */ + +#include "mooedit/mooedit-enum-types.h" + +#include "mooedit/mooedit-enums.h" + +/* enum MooEditConfigSource */ +GType +moo_edit_config_source_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_EDIT_CONFIG_SOURCE_USER, (char*) "MOO_EDIT_CONFIG_SOURCE_USER", (char*) "user" }, + { MOO_EDIT_CONFIG_SOURCE_FILE, (char*) "MOO_EDIT_CONFIG_SOURCE_FILE", (char*) "file" }, + { MOO_EDIT_CONFIG_SOURCE_FILENAME, (char*) "MOO_EDIT_CONFIG_SOURCE_FILENAME", (char*) "filename" }, + { MOO_EDIT_CONFIG_SOURCE_LANG, (char*) "MOO_EDIT_CONFIG_SOURCE_LANG", (char*) "lang" }, + { MOO_EDIT_CONFIG_SOURCE_AUTO, (char*) "MOO_EDIT_CONFIG_SOURCE_AUTO", (char*) "auto" }, + { 0, NULL, NULL } + }; + + etype = g_enum_register_static ("MooEditConfigSource", values); + } + + return etype; +} + +/* enum MooSaveResponse */ +GType +moo_save_response_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_SAVE_RESPONSE_CONTINUE, (char*) "MOO_SAVE_RESPONSE_CONTINUE", (char*) "continue" }, + { MOO_SAVE_RESPONSE_CANCEL, (char*) "MOO_SAVE_RESPONSE_CANCEL", (char*) "cancel" }, + { 0, NULL, NULL } + }; + + etype = g_enum_register_static ("MooSaveResponse", values); + } + + return etype; +} + +/* enum MooEditState */ +GType +moo_edit_state_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_EDIT_STATE_NORMAL, (char*) "MOO_EDIT_STATE_NORMAL", (char*) "normal" }, + { MOO_EDIT_STATE_LOADING, (char*) "MOO_EDIT_STATE_LOADING", (char*) "loading" }, + { MOO_EDIT_STATE_SAVING, (char*) "MOO_EDIT_STATE_SAVING", (char*) "saving" }, + { MOO_EDIT_STATE_PRINTING, (char*) "MOO_EDIT_STATE_PRINTING", (char*) "printing" }, + { 0, NULL, NULL } + }; + + etype = g_enum_register_static ("MooEditState", values); + } + + return etype; +} + +/* flags MooEditStatus */ +GType +moo_edit_status_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GFlagsValue values[] = { + { MOO_EDIT_STATUS_NORMAL, (char*) "MOO_EDIT_STATUS_NORMAL", (char*) "normal" }, + { MOO_EDIT_STATUS_MODIFIED_ON_DISK, (char*) "MOO_EDIT_STATUS_MODIFIED_ON_DISK", (char*) "modified-on-disk" }, + { MOO_EDIT_STATUS_DELETED, (char*) "MOO_EDIT_STATUS_DELETED", (char*) "deleted" }, + { MOO_EDIT_STATUS_CHANGED_ON_DISK, (char*) "MOO_EDIT_STATUS_CHANGED_ON_DISK", (char*) "changed-on-disk" }, + { MOO_EDIT_STATUS_MODIFIED, (char*) "MOO_EDIT_STATUS_MODIFIED", (char*) "modified" }, + { MOO_EDIT_STATUS_NEW, (char*) "MOO_EDIT_STATUS_NEW", (char*) "new" }, + { MOO_EDIT_STATUS_CLEAN, (char*) "MOO_EDIT_STATUS_CLEAN", (char*) "clean" }, + { 0, NULL, NULL } + }; + + etype = g_flags_register_static ("MooEditStatus", values); + } + + return etype; +} + +/* enum MooLineEndType */ +GType +moo_line_end_type_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_LE_NONE, (char*) "MOO_LE_NONE", (char*) "none" }, + { MOO_LE_UNIX, (char*) "MOO_LE_UNIX", (char*) "unix" }, + { MOO_LE_WIN32, (char*) "MOO_LE_WIN32", (char*) "win32" }, + { MOO_LE_MAC, (char*) "MOO_LE_MAC", (char*) "mac" }, + { MOO_LE_NATIVE, (char*) "MOO_LE_NATIVE", (char*) "native" }, + { 0, NULL, NULL } + }; + + etype = g_enum_register_static ("MooLineEndType", values); + } + + return etype; +} + +/* flags MooOpenFlags */ +GType +moo_open_flags_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GFlagsValue values[] = { + { MOO_OPEN_FLAG_NEW_WINDOW, (char*) "MOO_OPEN_FLAG_NEW_WINDOW", (char*) "new-window" }, + { MOO_OPEN_FLAG_NEW_TAB, (char*) "MOO_OPEN_FLAG_NEW_TAB", (char*) "new-tab" }, + { MOO_OPEN_FLAG_RELOAD, (char*) "MOO_OPEN_FLAG_RELOAD", (char*) "reload" }, + { MOO_OPEN_FLAG_CREATE_NEW, (char*) "MOO_OPEN_FLAG_CREATE_NEW", (char*) "create-new" }, + { 0, NULL, NULL } + }; + + etype = g_flags_register_static ("MooOpenFlags", values); + } + + return etype; +} + +/* enum MooTextSelectionType */ +GType +moo_text_selection_type_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_TEXT_SELECT_CHARS, (char*) "MOO_TEXT_SELECT_CHARS", (char*) "chars" }, + { MOO_TEXT_SELECT_WORDS, (char*) "MOO_TEXT_SELECT_WORDS", (char*) "words" }, + { MOO_TEXT_SELECT_LINES, (char*) "MOO_TEXT_SELECT_LINES", (char*) "lines" }, + { 0, NULL, NULL } + }; + + etype = g_enum_register_static ("MooTextSelectionType", values); + } + + return etype; +} + +/* flags MooTextSearchFlags */ +GType +moo_text_search_flags_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GFlagsValue values[] = { + { MOO_TEXT_SEARCH_CASELESS, (char*) "MOO_TEXT_SEARCH_CASELESS", (char*) "caseless" }, + { MOO_TEXT_SEARCH_REGEX, (char*) "MOO_TEXT_SEARCH_REGEX", (char*) "regex" }, + { MOO_TEXT_SEARCH_WHOLE_WORDS, (char*) "MOO_TEXT_SEARCH_WHOLE_WORDS", (char*) "whole-words" }, + { MOO_TEXT_SEARCH_REPL_LITERAL, (char*) "MOO_TEXT_SEARCH_REPL_LITERAL", (char*) "repl-literal" }, + { 0, NULL, NULL } + }; + + etype = g_flags_register_static ("MooTextSearchFlags", values); + } + + return etype; +} + +/* flags MooFindFlags */ +GType +moo_find_flags_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GFlagsValue values[] = { + { MOO_FIND_REGEX, (char*) "MOO_FIND_REGEX", (char*) "regex" }, + { MOO_FIND_CASELESS, (char*) "MOO_FIND_CASELESS", (char*) "caseless" }, + { MOO_FIND_IN_SELECTED, (char*) "MOO_FIND_IN_SELECTED", (char*) "in-selected" }, + { MOO_FIND_BACKWARDS, (char*) "MOO_FIND_BACKWARDS", (char*) "backwards" }, + { MOO_FIND_WHOLE_WORDS, (char*) "MOO_FIND_WHOLE_WORDS", (char*) "whole-words" }, + { MOO_FIND_FROM_CURSOR, (char*) "MOO_FIND_FROM_CURSOR", (char*) "from-cursor" }, + { MOO_FIND_DONT_PROMPT, (char*) "MOO_FIND_DONT_PROMPT", (char*) "dont-prompt" }, + { MOO_FIND_REPL_LITERAL, (char*) "MOO_FIND_REPL_LITERAL", (char*) "repl-literal" }, + { 0, NULL, NULL } + }; + + etype = g_flags_register_static ("MooFindFlags", values); + } + + return etype; +} + +/* flags MooDrawWsFlags */ +GType +moo_draw_ws_flags_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GFlagsValue values[] = { + { MOO_DRAW_WS_NONE, (char*) "MOO_DRAW_WS_NONE", (char*) "none" }, + { MOO_DRAW_WS_SPACES, (char*) "MOO_DRAW_WS_SPACES", (char*) "spaces" }, + { MOO_DRAW_WS_TABS, (char*) "MOO_DRAW_WS_TABS", (char*) "tabs" }, + { MOO_DRAW_WS_TRAILING, (char*) "MOO_DRAW_WS_TRAILING", (char*) "trailing" }, + { 0, NULL, NULL } + }; + + etype = g_flags_register_static ("MooDrawWsFlags", values); + } + + return etype; +} + +/* enum MooActionCheckType */ +GType +moo_action_check_type_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_ACTION_CHECK_SENSITIVE, (char*) "MOO_ACTION_CHECK_SENSITIVE", (char*) "sensitive" }, + { MOO_ACTION_CHECK_VISIBLE, (char*) "MOO_ACTION_CHECK_VISIBLE", (char*) "visible" }, + { MOO_ACTION_CHECK_ACTIVE, (char*) "MOO_ACTION_CHECK_ACTIVE", (char*) "active" }, + { 0, NULL, NULL } + }; + + etype = g_enum_register_static ("MooActionCheckType", values); + } + + return etype; +} + +/* enum MooTextCursor */ +GType +moo_text_cursor_get_type (void) +{ + static GType etype; + + if (G_UNLIKELY (!etype)) + { + static const GEnumValue values[] = { + { MOO_TEXT_CURSOR_NONE, (char*) "MOO_TEXT_CURSOR_NONE", (char*) "none" }, + { MOO_TEXT_CURSOR_TEXT, (char*) "MOO_TEXT_CURSOR_TEXT", (char*) "text" }, + { MOO_TEXT_CURSOR_ARROW, (char*) "MOO_TEXT_CURSOR_ARROW", (char*) "arrow" }, + { MOO_TEXT_CURSOR_LINK, (char*) "MOO_TEXT_CURSOR_LINK", (char*) "link" }, + { 0, NULL, NULL } + }; + + etype = g_enum_register_static ("MooTextCursor", values); + } + + return etype; +} + + +/* Generated data ends here */ + diff --git a/moo/mooedit/mooedit-enum-types.h b/moo/mooedit/mooedit-enum-types.h new file mode 100644 index 00000000..53380fcf --- /dev/null +++ b/moo/mooedit/mooedit-enum-types.h @@ -0,0 +1,64 @@ + +/* Generated data (by glib-mkenums) */ + +#ifndef MOO_EDIT_ENUM_TYPES_H +#define MOO_EDIT_ENUM_TYPES_H + +#include + +G_BEGIN_DECLS + +/* MooEditConfigSource */ +GType moo_edit_config_source_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_EDIT_CONFIG_SOURCE (moo_edit_config_source_get_type ()) + +/* MooSaveResponse */ +GType moo_save_response_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_SAVE_RESPONSE (moo_save_response_get_type ()) + +/* MooEditState */ +GType moo_edit_state_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_EDIT_STATE (moo_edit_state_get_type ()) + +/* MooEditStatus */ +GType moo_edit_status_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_EDIT_STATUS (moo_edit_status_get_type ()) + +/* MooLineEndType */ +GType moo_line_end_type_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_LINE_END_TYPE (moo_line_end_type_get_type ()) + +/* MooOpenFlags */ +GType moo_open_flags_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_OPEN_FLAGS (moo_open_flags_get_type ()) + +/* MooTextSelectionType */ +GType moo_text_selection_type_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_TEXT_SELECTION_TYPE (moo_text_selection_type_get_type ()) + +/* MooTextSearchFlags */ +GType moo_text_search_flags_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_TEXT_SEARCH_FLAGS (moo_text_search_flags_get_type ()) + +/* MooFindFlags */ +GType moo_find_flags_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_FIND_FLAGS (moo_find_flags_get_type ()) + +/* MooDrawWsFlags */ +GType moo_draw_ws_flags_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_DRAW_WS_FLAGS (moo_draw_ws_flags_get_type ()) + +/* MooActionCheckType */ +GType moo_action_check_type_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_ACTION_CHECK_TYPE (moo_action_check_type_get_type ()) + +/* MooTextCursor */ +GType moo_text_cursor_get_type (void) G_GNUC_CONST; +#define MOO_TYPE_TEXT_CURSOR (moo_text_cursor_get_type ()) + +G_END_DECLS + +#endif /* MOO_EDIT_ENUM_TYPES_H */ + +/* Generated data ends here */ + From 69eb126aab0f9bd1380372251b644f4e5ac29b51 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Sat, 5 Feb 2011 22:17:19 -0800 Subject: [PATCH 2/4] Removed MOO_EDIT_IS_MODIFIED and MOO_EDIT_IS_CLEAN macros --- moo/mooedit/mooedit.c | 14 ++++++++++++-- moo/mooedit/mooedit.h | 4 +--- moo/mooedit/mooeditor.c | 6 +++--- moo/plugins/usertools/moocommand.c | 2 +- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/moo/mooedit/mooedit.c b/moo/mooedit/mooedit.c index 9028237e..cd2053fa 100644 --- a/moo/mooedit/mooedit.c +++ b/moo/mooedit/mooedit.c @@ -594,7 +594,7 @@ moo_edit_is_empty (MooEdit *edit) g_return_val_if_fail (MOO_IS_EDIT (edit), FALSE); - if (MOO_EDIT_IS_BUSY (edit) || MOO_EDIT_IS_MODIFIED (edit) || !MOO_EDIT_IS_UNTITLED (edit)) + if (MOO_EDIT_IS_BUSY (edit) || moo_edit_is_modified (edit) || !MOO_EDIT_IS_UNTITLED (edit)) return FALSE; gtk_text_buffer_get_bounds (moo_edit_get_buffer (edit), &start, &end); @@ -619,7 +619,17 @@ gboolean moo_edit_is_modified (MooEdit *edit) { g_return_val_if_fail (MOO_IS_EDIT (edit), FALSE); - return MOO_EDIT_IS_MODIFIED (edit); + return (moo_edit_get_status (edit) & MOO_EDIT_STATUS_MODIFIED) != 0; +} + +/** + * moo_edit_is_clean: + **/ +gboolean +moo_edit_is_clean (MooEdit *edit) +{ + g_return_val_if_fail (MOO_IS_EDIT (edit), FALSE); + return (moo_edit_get_status (edit) & MOO_EDIT_STATUS_CLEAN) != 0; } /** diff --git a/moo/mooedit/mooedit.h b/moo/mooedit/mooedit.h index eebf4a93..f0272a81 100644 --- a/moo/mooedit/mooedit.h +++ b/moo/mooedit/mooedit.h @@ -32,9 +32,6 @@ G_BEGIN_DECLS #define MOO_IS_EDIT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MOO_TYPE_EDIT)) #define MOO_EDIT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MOO_TYPE_EDIT, MooEditClass)) -#define MOO_EDIT_IS_MODIFIED(edit) ((moo_edit_get_status (edit) & MOO_EDIT_STATUS_MODIFIED) != 0) -#define MOO_EDIT_IS_CLEAN(edit) ((moo_edit_get_status (edit) & MOO_EDIT_STATUS_CLEAN) != 0) - typedef struct MooEditPrivate MooEditPrivate; typedef struct MooEditClass MooEditClass; @@ -101,6 +98,7 @@ void moo_edit_set_line_end_type (MooEdit *edi gboolean moo_edit_is_empty (MooEdit *edit); gboolean moo_edit_is_untitled (MooEdit *edit); gboolean moo_edit_is_modified (MooEdit *edit); +gboolean moo_edit_is_clean (MooEdit *edit); void moo_edit_set_modified (MooEdit *edit, gboolean modified); gboolean moo_edit_get_clean (MooEdit *edit); diff --git a/moo/mooedit/mooeditor.c b/moo/mooedit/mooeditor.c index 5a866a71..b0323248 100644 --- a/moo/mooedit/mooeditor.c +++ b/moo/mooedit/mooeditor.c @@ -1774,7 +1774,7 @@ find_modified (MooEditArray *docs) guint i; MooEditArray *modified = moo_edit_array_new (); for (i = 0; i < docs->n_elms; ++i) - if (MOO_EDIT_IS_MODIFIED (docs->elms[i]) && !MOO_EDIT_IS_CLEAN (docs->elms[i])) + if (moo_edit_is_modified (docs->elms[i]) && !moo_edit_is_clean (docs->elms[i])) moo_edit_array_append (modified, docs->elms[i]); return modified; } @@ -2485,8 +2485,8 @@ moo_editor_reload (MooEditor *editor, } if (!is_embedded (editor) && - !MOO_EDIT_IS_CLEAN (doc) && - MOO_EDIT_IS_MODIFIED (doc) && + !moo_edit_is_clean (doc) && + moo_edit_is_modified (doc) && !_moo_edit_reload_modified_dialog (doc)) { g_set_error (error, diff --git a/moo/plugins/usertools/moocommand.c b/moo/plugins/usertools/moocommand.c index 7a6d61fd..f89c8c46 100644 --- a/moo/plugins/usertools/moocommand.c +++ b/moo/plugins/usertools/moocommand.c @@ -412,7 +412,7 @@ save_one (MooEdit *doc) { g_return_val_if_fail (MOO_IS_EDIT (doc), FALSE); - if (MOO_EDIT_IS_MODIFIED (doc) && !moo_edit_save (doc, NULL)) + if (moo_edit_is_modified (doc) && !moo_edit_save (doc, NULL)) return FALSE; return TRUE; From 335bf43e9aeec2cded3a39859c0ae9dd8b4eac79 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Sat, 5 Feb 2011 22:20:54 -0800 Subject: [PATCH 3/4] Removed moo_edit_is_clean(), there is moo_edit_get_clean() already --- moo/mooedit/mooedit.c | 10 ---------- moo/mooedit/mooedit.h | 1 - moo/mooedit/mooeditor.c | 4 ++-- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/moo/mooedit/mooedit.c b/moo/mooedit/mooedit.c index cd2053fa..ed5abd00 100644 --- a/moo/mooedit/mooedit.c +++ b/moo/mooedit/mooedit.c @@ -622,16 +622,6 @@ moo_edit_is_modified (MooEdit *edit) return (moo_edit_get_status (edit) & MOO_EDIT_STATUS_MODIFIED) != 0; } -/** - * moo_edit_is_clean: - **/ -gboolean -moo_edit_is_clean (MooEdit *edit) -{ - g_return_val_if_fail (MOO_IS_EDIT (edit), FALSE); - return (moo_edit_get_status (edit) & MOO_EDIT_STATUS_CLEAN) != 0; -} - /** * moo_edit_get_status: **/ diff --git a/moo/mooedit/mooedit.h b/moo/mooedit/mooedit.h index f0272a81..376762af 100644 --- a/moo/mooedit/mooedit.h +++ b/moo/mooedit/mooedit.h @@ -98,7 +98,6 @@ void moo_edit_set_line_end_type (MooEdit *edi gboolean moo_edit_is_empty (MooEdit *edit); gboolean moo_edit_is_untitled (MooEdit *edit); gboolean moo_edit_is_modified (MooEdit *edit); -gboolean moo_edit_is_clean (MooEdit *edit); void moo_edit_set_modified (MooEdit *edit, gboolean modified); gboolean moo_edit_get_clean (MooEdit *edit); diff --git a/moo/mooedit/mooeditor.c b/moo/mooedit/mooeditor.c index b0323248..e2887bc5 100644 --- a/moo/mooedit/mooeditor.c +++ b/moo/mooedit/mooeditor.c @@ -1774,7 +1774,7 @@ find_modified (MooEditArray *docs) guint i; MooEditArray *modified = moo_edit_array_new (); for (i = 0; i < docs->n_elms; ++i) - if (moo_edit_is_modified (docs->elms[i]) && !moo_edit_is_clean (docs->elms[i])) + if (moo_edit_is_modified (docs->elms[i]) && !moo_edit_get_clean (docs->elms[i])) moo_edit_array_append (modified, docs->elms[i]); return modified; } @@ -2485,7 +2485,7 @@ moo_editor_reload (MooEditor *editor, } if (!is_embedded (editor) && - !moo_edit_is_clean (doc) && + !moo_edit_get_clean (doc) && moo_edit_is_modified (doc) && !_moo_edit_reload_modified_dialog (doc)) { From 6a74a5e838c157c4b0b5f397cdf923ac89a0f8e9 Mon Sep 17 00:00:00 2001 From: Yevgen Muntyan <17531749+muntyan@users.noreply.github.com> Date: Thu, 24 Feb 2011 21:25:54 -0800 Subject: [PATCH 4/4] Ignore buffer callbacks after syntax highlighting is disabled, fixes a crash --- moo/gtksourceview/gtksourcecontextengine.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/moo/gtksourceview/gtksourcecontextengine.c b/moo/gtksourceview/gtksourcecontextengine.c index faa16528..68520050 100644 --- a/moo/gtksourceview/gtksourcecontextengine.c +++ b/moo/gtksourceview/gtksourcecontextengine.c @@ -1676,6 +1676,9 @@ gtk_source_context_engine_text_inserted (GtkSourceEngine *engine, g_return_if_fail (start_offset < end_offset); + if (ce->priv->disabled) + return; + invalidate_region (ce, start_offset, end_offset - start_offset); /* If end_offset is at the start of a line (enter key pressed) then @@ -1812,7 +1815,13 @@ gtk_source_context_engine_text_deleted (GtkSourceEngine *engine, gint offset, gint length) { + GtkSourceContextEngine *ce = GTK_SOURCE_CONTEXT_ENGINE (engine); + g_return_if_fail (length > 0); + + if (ce->priv->disabled) + return; + invalidate_region (GTK_SOURCE_CONTEXT_ENGINE (engine), offset, - length);