trimLeft context lines to be consistent with the matched line
MODIFY
lib/project/match-view.js
lib/project/match-view.js
@@ -68,7 +68,7 @@ class MatchView {
leadingContextLines ? leadingContextLines.map((line, index) =>
$.li({className: 'list-item'},
$.span({className: 'line-number text-subtle'}, range.start.row + 1 - leadingContextLines.length + index),
- $.span({className: 'preview'}, $.span({}, line))
+ $.span({className: 'preview'}, $.span({}, line.trimLeft()))
)
) : null,
@@ -92,7 +92,7 @@ class MatchView {
trailingContextLines ? trailingContextLines.map((line, index) =>
$.li({className: 'list-item'},
$.span({className: 'line-number text-subtle'}, range.end.row + 1 + index + 1),
- $.span({className: 'preview'}, $.span({}, line))
+ $.span({className: 'preview'}, $.span({}, line.trimLeft()))
)
) : null
)

trimLeft context lines to be consistent with the matched line