From c9c9837da5cc843cd436fbe59be8d2de8b2e1078 Mon Sep 17 00:00:00 2001 From: Vadim Lopatin Date: Tue, 12 Jan 2016 11:09:35 +0300 Subject: [PATCH] fix crash on removing editor mark --- src/dlangui/core/editable.d | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dlangui/core/editable.d b/src/dlangui/core/editable.d index d02e0445..f9df5303 100644 --- a/src/dlangui/core/editable.d +++ b/src/dlangui/core/editable.d @@ -1518,6 +1518,7 @@ struct LineIcons { LineIcon res = _items[index]; for (int i = index; i < _len - 1; i++) _items[i] = _items[i + 1]; + _items[_len] = null; _len--; return res; } @@ -1587,7 +1588,7 @@ struct LineIcons { if (deltaLines < 0 && rangeBefore.end.line >= item.line && rangeAfter.end.line < item.line) { // remove removed ~= item; - _items.remove(i); + remove(i); res = true; } else { // move