From 7dd433dc083d2b6129195b17f7de0f65b57f1cf0 Mon Sep 17 00:00:00 2001 From: Aleksey Kulikov Date: Thu, 9 Dec 2021 20:57:37 +0300 Subject: [PATCH] fix(diff): return content of the line with correct length --- lib/src/diff.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/src/diff.dart b/lib/src/diff.dart index fb06342..7ddf1be 100644 --- a/lib/src/diff.dart +++ b/lib/src/diff.dart @@ -399,8 +399,9 @@ class DiffLine { int get contentOffset => _diffLinePointer.ref.content_offset; /// Content of the diff line. - String get content => - _diffLinePointer.ref.content.cast().toDartString(); + String get content => _diffLinePointer.ref.content + .cast() + .toDartString(length: _diffLinePointer.ref.content_len); @override String toString() {