Skip to content

Commit df3df9c

Browse files
author
delphidabbler
committed
Prevent category names in labels with ampersands being treated as accel chars
Fixes issue #4
1 parent 6fea6bc commit df3df9c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: Src/FmSWAGImportDlg.pas

+3-1
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,9 @@ procedure TSWAGImportDlg.DisplaySnippetsForCategory;
510510
Exit;
511511
fCurrentCatID := fSortedCategories[CatIdx].ID;
512512
lblSelectSnippets.Caption := Format(
513-
sSnippetListCaption, [fSortedCategories[CatIdx].Title]
513+
sSnippetListCaption,
514+
// double up ampersands to avoid being treated as accelerator characters
515+
[StrReplace(fSortedCategories[CatIdx].Title, '&', '&&')]
514516
);
515517
Snippets := TList<TSWAGSnippet>.Create;
516518
try

0 commit comments

Comments
 (0)