From aeb67cd13dcf5e5b69898dff6c05c605a81827f4 Mon Sep 17 00:00:00 2001 From: Christoph Schlosser Date: Fri, 2 Mar 2018 23:24:50 +0100 Subject: Add brief template --- src/Lang/Cpp/CppDocGen.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Lang/Cpp/CppDocGen.ts') diff --git a/src/Lang/Cpp/CppDocGen.ts b/src/Lang/Cpp/CppDocGen.ts index 56ce922..dd4818a 100644 --- a/src/Lang/Cpp/CppDocGen.ts +++ b/src/Lang/Cpp/CppDocGen.ts @@ -162,7 +162,9 @@ export class CppDocGen implements IDocGen { } protected generateBrief(lines: string[]) { - lines.push(this.cfg.C.commentPrefix + this.cfg.Generic.briefTemplate + this.getSmartText()); + lines.push(this.getTemplatedString(this.cfg.textTemplateReplace, + this.cfg.C.commentPrefix + this.cfg.Generic.briefTemplate, + this.getSmartText())); } protected generateFromTemplate(lines: string[], replace: string, template: string, templateWith: string[]) { @@ -365,10 +367,8 @@ export class CppDocGen implements IDocGen { line = baseLine; character = baseCharacter; } - const start = character - this.smartTextLength - 1; - const from: Position = new Position(line, (start > 0 ? start : 0)); const to: Position = new Position(line, character); - this.activeEditor.selection = new Selection(from, to); + this.activeEditor.selection = new Selection(to, to); } protected splitCasing(text: string): string { -- cgit v1.2.3