mirror of https://gitlab.com/basile.b/dexed.git
dont include backtick if search result is also highlighted
This commit is contained in:
parent
957ca1321a
commit
95f9babd0c
|
@ -1,3 +1,9 @@
|
|||
# v3.9.13-dev
|
||||
|
||||
## Enhancements
|
||||
|
||||
- messages, search results: exclude backticks if the option _backTicksHighlight_ is enabled.
|
||||
|
||||
# v3.9.12
|
||||
|
||||
## Enhancement
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue