Skip to content
Permalink
Browse files

Never prepend "AND " in first quick filter. Closes #796

  • Loading branch information...
ansgarbecker committed Nov 7, 2019
1 parent 17e75e7 commit dac87729cacbbe26164783b0cd91d37fb2202165
Showing with 8 additions and 4 deletions.
  1. +8 −4 source/main.pas
@@ -6373,10 +6373,14 @@ procedure TMainForm.QuickFilterClick(Sender: TObject);
if Filter <> '' then begin
SynMemoFilter.UndoList.AddGroupBreak;
SynMemoFilter.SelectAll;
if KeyPressed(VK_SHIFT) and (Pos(Filter, SynmemoFilter.Text) = 0) and (Pos(SynmemoFilter.Text, Filter) = 0) then
SynmemoFilter.SelText := SynmemoFilter.Text + ' AND ' + Filter
else
SynmemoFilter.SelText := Filter;
if KeyPressed(VK_SHIFT)
and (Pos(Filter, SynMemoFilter.Text) = 0) and (Pos(SynMemoFilter.Text, Filter) = 0)
and (not SynMemoFilter.Text.Trim.IsEmpty)
then begin
SynMemoFilter.SelText := SynMemoFilter.Text + ' AND ' + Filter
end else begin
SynMemoFilter.SelText := Filter;
end;
ToggleFilterPanel(True);
actApplyFilterExecute(Sender);
end;

0 comments on commit dac8772

Please sign in to comment.
You can’t perform that action at this time.