diff --git a/CHANGELOG.md b/CHANGELOG.md index 102c4c71..a52724d8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# v3.9.13-dev + +## Enhancements + +- messages, search results: exclude backticks if the option _backTicksHighlight_ is enabled. + # v3.9.12 ## Enhancement diff --git a/src/u_messages.pas b/src/u_messages.pas index 3536f1fd..56194865 100644 --- a/src/u_messages.pas +++ b/src/u_messages.pas @@ -638,6 +638,7 @@ var s: string; p: boolean = false; c: array [boolean] of TColor; + y: boolean; begin rc := node.DisplayRect(false); x := rc.Left + 2 - TTreeHack(list).ScrolledLeft; @@ -655,6 +656,7 @@ begin node.ImageIndex, Node.NodeEffect); x += list.Images.Width + 5; + y := fCtxt = amcSearch; if not fOptions.backticksHighlight then Sender.Canvas.TextOut(x, rc.Top, Node.Text) else if node.Text.isNotEmpty then @@ -669,6 +671,7 @@ begin s := t.yield(); Sender.Canvas.font.Color:= c[p]; Sender.Canvas.TextOut(x, rc.Top, s); + x += sender.Canvas.TextWidth(s); // possibly highlighted part @@ -684,6 +687,8 @@ begin r.popFront(); end; s += t.yield(); + if y and (s.length > 2) then + s := s[2 .. s.length-1]; Sender.Canvas.font.Color:= c[p]; Sender.Canvas.TextOut(x, rc.Top, s); x += sender.Canvas.TextWidth(s);