Kaydet (Commit) eb7fd066 authored tarafından Colomban Wendling's avatar Colomban Wendling

Don't alter GeanyEditor internal state in editor_create_widget()

When editor_create_widget() is used on an editor with already existing
widget, don't reset the internal indentation settings of that editor.
üst 41c66e0e
......@@ -4823,6 +4823,8 @@ ScintillaObject *editor_create_widget(GeanyEditor *editor)
{
const GeanyIndentPrefs *iprefs = get_default_indent_prefs();
ScintillaObject *old, *sci;
GeanyIndentType old_indent_type = editor->indent_type;
gint old_indent_width = editor->indent_width;
/* temporarily change editor to use the new sci widget */
old = editor->sci;
......@@ -4835,7 +4837,11 @@ ScintillaObject *editor_create_widget(GeanyEditor *editor)
/* if editor already had a widget, restore it */
if (old)
{
editor->indent_type = old_indent_type;
editor->indent_width = old_indent_width;
editor->sci = old;
}
return sci;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment