From 98f98c64fc7bfd153e208fb5ee8a9d412801a97d Mon Sep 17 00:00:00 2001 From: Grim Date: Mon, 14 Oct 2024 23:49:34 +0300 Subject: [PATCH] OpenD-related fixes --- src/dlangui/dml/tokenizer.d | 2 +- src/dlangui/widgets/editors.d | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/dlangui/dml/tokenizer.d b/src/dlangui/dml/tokenizer.d index 4cb123f82..296420be2 100644 --- a/src/dlangui/dml/tokenizer.d +++ b/src/dlangui/dml/tokenizer.d @@ -101,7 +101,7 @@ class ParserException : Exception { /// simple tokenizer for DlangUI ML class Tokenizer { - protected string[] _singleLineCommentPrefixes = ["//"]; + protected string[] _singleLineCommentPrefixes; protected LineStream _lines; protected dchar[] _lineText; protected ushort _line; diff --git a/src/dlangui/widgets/editors.d b/src/dlangui/widgets/editors.d index 34468a93f..25fa650eb 100644 --- a/src/dlangui/widgets/editors.d +++ b/src/dlangui/widgets/editors.d @@ -415,7 +415,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction } /// Characters at which content is split for word wrap mode - dchar[] splitChars = [' ', '-', '\t']; + immutable dchar[] splitChars = [' ', '-', '\t']; /// Divides up a string for word wrapping, sets info in _span dstring[] wrapLine(dstring str, int lineNumber) { @@ -465,7 +465,7 @@ class EditWidgetBase : ScrollWidgetBase, EditableContentListener, MenuItemAction } /// Divide (and conquer) text into words - dstring[] explode(dstring str, dchar[] splitChars) + dstring[] explode(dstring str, const(dchar)[] splitChars) { dstring[] parts; int startIndex = 0;