[gnome-text-editor] document: cleanup highlight-syntax checks
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-text-editor] document: cleanup highlight-syntax checks
- Date: Mon, 1 Aug 2022 20:07:51 +0000 (UTC)
commit 3baf2978a91731303ba7f5734a14dab0863b8ee7
Author: Christian Hergert <chergert redhat com>
Date: Mon Aug 1 13:06:34 2022 -0700
document: cleanup highlight-syntax checks
src/editor-document.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/editor-document.c b/src/editor-document.c
index 217323c..fa5d99f 100644
--- a/src/editor-document.c
+++ b/src/editor-document.c
@@ -1484,7 +1484,7 @@ editor_document_do_load (EditorDocument *self,
/* We are creating a new file. */
editor_document_set_busy_progress (self, 1, 2, 1.0);
_editor_document_unmark_busy (self);
- gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (self), TRUE);
+ gtk_source_buffer_set_highlight_syntax (GTK_SOURCE_BUFFER (self), load->highlight_syntax);
editor_text_buffer_spell_adapter_set_enabled (self->spell_adapter, load->check_spelling);
g_task_return_boolean (task, TRUE);
return;
@@ -1714,8 +1714,8 @@ _editor_document_load_async (EditorDocument *self,
else
load->mount_operation = g_mount_operation_new ();
- if (gtk_source_buffer_get_highlight_syntax (GTK_SOURCE_BUFFER (self)))
- load->highlight_syntax = TRUE;
+ load->highlight_syntax =
+ gtk_source_buffer_get_highlight_syntax (GTK_SOURCE_BUFFER (self));
load->check_spelling =
editor_text_buffer_spell_adapter_get_enabled (self->spell_adapter);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]