Skip to content

Commit

Permalink
Issue #1927: display column comments in completion proposal, give tha…
Browse files Browse the repository at this point in the history
…t third column more space to the left and italic style
  • Loading branch information
ansgarbecker committed Mar 28, 2024
1 parent 59c2122 commit 6434e2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/apphelpers.pas
Expand Up @@ -2899,7 +2899,7 @@ procedure ToggleCheckBoxWithoutClick(chk: TCheckBox; State: Boolean);
function SynCompletionProposalPrettyText(ImageIndex: Integer; LeftText, CenterText, RightText: String;
LeftColor: TColor=-1; CenterColor: TColor=-1; RightColor: TColor=-1): String;
const
LineFormat = '\image{%d}\hspace{5}\color{%s}%s\column{}\color{%s}%s\hspace{5}\color{%s}%s';
LineFormat = '\image{%d}\hspace{5}\color{%s}%s\column{}\color{%s}%s\hspace{10}\color{%s}\style{+i}%s';
begin
// Return formatted item string for a TSynCompletionProposal
if LeftColor = -1 then LeftColor := clGrayText;
Expand Down
2 changes: 1 addition & 1 deletion source/main.pas
Expand Up @@ -6806,7 +6806,7 @@ procedure TMainForm.SynCompletionProposalExecute(Kind: SynCompletionType;
if (Obj.Name.ToLowerInvariant = tblname.ToLowerInvariant) and (Obj.NodeType in [lntTable, lntView]) then begin
Columns := Obj.TableColumns;
for Col in Columns do begin
DisplayText := SynCompletionProposalPrettyText(ICONINDEX_FIELD, LowerCase(Col.DataType.Name), Col.Name, '', DatatypeCategories[Col.DataType.Category].NullColor);
DisplayText := SynCompletionProposalPrettyText(ICONINDEX_FIELD, LowerCase(Col.DataType.Name), Col.Name, Col.Comment, DatatypeCategories[Col.DataType.Category].NullColor);
Proposal.AddItem(DisplayText, Col.Name);
Inc(ColumnsInList);
end;
Expand Down

0 comments on commit 6434e2f

Please sign in to comment.