File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -374,13 +374,8 @@ void ResultDock::formatHitsLines(const SciSendFn& sciSend,
374
374
// Trim any CR/LF at end
375
375
while (!raw.empty () && (raw.back () == ' \r ' || raw.back () == ' \n ' ))
376
376
raw.pop_back ();
377
-
378
- // Trim leading spaces/tabs
379
- size_t lead = raw.find_first_not_of (" \t " );
380
- std::string_view sliceBytes =
381
- (lead == std::string::npos)
382
- ? std::string_view{}
383
- : std::string_view (raw).substr (lead);
377
+
378
+ std::string_view sliceBytes (raw);
384
379
385
380
// --- IMPORTANT: produce two representations ---
386
381
// 1) UTF-8 bytes for accurate byte‑offset highlighting
@@ -395,8 +390,7 @@ void ResultDock::formatHitsLines(const SciSendFn& sciSend,
395
390
size_t prefixU8Len = Encoding::wstringToUtf8 (prefixW).size ();
396
391
397
392
// Compute byte‑offset of match start within sliceU8
398
- Sci_Position absTrimmed = sciSend (SCI_POSITIONFROMLINE, lineZero, 0 )
399
- + static_cast <Sci_Position>(lead);
393
+ Sci_Position absTrimmed = sciSend (SCI_POSITIONFROMLINE, lineZero, 0 );
400
394
size_t relBytes = static_cast <size_t >(h.pos - absTrimmed);
401
395
402
396
// Compute byte‑lengths for the match portion
You can’t perform that action at this time.
0 commit comments