[geany/geany] 97f8f3: Revert "add 'folding margin width setting' (#2140)"
Colomban Wendling
git-noreply at xxxxx
Sun Oct 25 09:33:19 UTC 2020
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 25 Oct 2020 09:33:19 UTC
Commit: 97f8f3c7afea387adbfa91df04de006f6af0c6d7
https://github.com/geany/geany/commit/97f8f3c7afea387adbfa91df04de006f6af0c6d7
Log Message:
-----------
Revert "add 'folding margin width setting' (#2140)"
This reverts commit d8f532b5adf41ae57b99b6ac95d336401ba15e35.
Modified Paths:
--------------
data/filedefs/filetypes.common
src/editor.c
src/highlighting.c
src/sciwrappers.c
src/sciwrappers.h
Modified: data/filedefs/filetypes.common
3 lines changed, 0 insertions(+), 3 deletions(-)
===================================================================
@@ -19,9 +19,6 @@ margin_linenumber=margin_line_number
margin_folding=margin_folding
fold_symbol_highlight=fold_symbol_highlight
-# width of the folding margin on the right of the line numbers
-folding_margin_width=12
-
# background colour of the current line, only the second and third argument is interpreted
# use the third argument to enable or disable the highlighting of the current line (has to be true/false)
current_line=current_line
Modified: src/editor.c
2 lines changed, 2 insertions(+), 0 deletions(-)
===================================================================
@@ -5189,6 +5189,8 @@ void editor_apply_update_prefs(GeanyEditor *editor)
sci_set_symbol_margin(sci, editor_prefs.show_markers_margin);
sci_set_line_numbers(sci, editor_prefs.show_linenumber_margin);
+ sci_set_folding_margin_visible(sci, editor_prefs.folding);
+
/* virtual space */
SSM(sci, SCI_SETVIRTUALSPACEOPTIONS, editor_prefs.show_virtual_space, 0);
Modified: src/highlighting.c
21 lines changed, 0 insertions(+), 21 deletions(-)
===================================================================
@@ -96,7 +96,6 @@ enum /* Geany common styling */
GCS_LINE_HEIGHT,
GCS_CALLTIPS,
GCS_INDICATOR_ERROR,
- GCS_FOLDING_MARGIN_WIDTH,
GCS_MAX
};
@@ -565,8 +564,6 @@ static void styleset_common_init(GKeyFile *config, GKeyFile *config_home)
1, 1, &common_style_set.fold_marker, &common_style_set.fold_lines);
get_keyfile_ints(config, config_home, "styling", "folding_horiz_line",
2, 0, &common_style_set.fold_draw_line, NULL);
- get_keyfile_ints(config, config_home, "styling", "folding_margin_width",
- 1, 0, &common_style_set.styling[GCS_FOLDING_MARGIN_WIDTH].background, NULL);
get_keyfile_ints(config, config_home, "styling", "caret_width",
1, 0, &common_style_set.styling[GCS_CARET].background, NULL); /* caret.foreground used earlier */
get_keyfile_int(config, config_home, "styling", "line_wrap_visuals",
@@ -808,22 +805,6 @@ static void styleset_common(ScintillaObject *sci, guint ft_id)
}
-/* folding margin visibility */
-static void set_folding_margin_visible(ScintillaObject *sci, gboolean set)
-{
- if (set)
- {
- SSM(sci, SCI_SETMARGINWIDTHN, 2, common_style_set.styling[GCS_FOLDING_MARGIN_WIDTH].background);
- SSM(sci, SCI_SETMARGINSENSITIVEN, 2, TRUE);
- }
- else
- {
- SSM(sci, SCI_SETMARGINSENSITIVEN, 2, FALSE);
- SSM(sci, SCI_SETMARGINWIDTHN, 2, 0);
- }
-}
-
-
/* Merge & assign global typedefs and user secondary keywords.
* keyword_idx is used for both style_sets[].keywords and scintilla keyword style number */
static void merge_type_keywords(ScintillaObject *sci, guint ft_id, guint keyword_idx)
@@ -899,8 +880,6 @@ static void styleset_from_mapping(ScintillaObject *sci, guint ft_id, guint lexer
}
}
- set_folding_margin_visible(sci, editor_prefs.folding);
-
/* keywords */
foreach_range(i, n_keywords)
{
Modified: src/sciwrappers.c
16 lines changed, 16 insertions(+), 0 deletions(-)
===================================================================
@@ -160,6 +160,22 @@ void sci_set_symbol_margin(ScintillaObject *sci, gboolean set)
}
+/* folding margin visibility */
+void sci_set_folding_margin_visible(ScintillaObject *sci, gboolean set)
+{
+ if (set)
+ {
+ SSM(sci, SCI_SETMARGINWIDTHN, 2, 12);
+ SSM(sci, SCI_SETMARGINSENSITIVEN, 2, TRUE);
+ }
+ else
+ {
+ SSM(sci, SCI_SETMARGINSENSITIVEN, 2, FALSE);
+ SSM(sci, SCI_SETMARGINWIDTHN, 2, 0);
+ }
+}
+
+
/* end of lines */
void sci_set_visible_eols(ScintillaObject *sci, gboolean set)
{
Modified: src/sciwrappers.h
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -157,6 +157,7 @@ void sci_toggle_fold (ScintillaObject *sci, gint line);
gint sci_get_fold_level (ScintillaObject *sci, gint line);
gint sci_get_fold_parent (ScintillaObject *sci, gint start_line);
+void sci_set_folding_margin_visible (ScintillaObject *sci, gboolean set);
gboolean sci_get_fold_expanded (ScintillaObject *sci, gint line);
void sci_colourise (ScintillaObject *sci, gint start, gint end);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list