summaryrefslogtreecommitdiffstats
path: root/src/Lang/Cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Lang/Cpp')
-rw-r--r--src/Lang/Cpp/CppDocGen.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Lang/Cpp/CppDocGen.ts b/src/Lang/Cpp/CppDocGen.ts
index e715583..b98abea 100644
--- a/src/Lang/Cpp/CppDocGen.ts
+++ b/src/Lang/Cpp/CppDocGen.ts
@@ -55,8 +55,7 @@ export default class CppDocGen implements IDocGen {
Implementation
***************************************************************************/
protected getIndentation(): string {
- const line: TextLine = this.activeEditor.document.lineAt(this.activeEditor.selection.start.line);
- return line.text.slice(0, line.firstNonWhitespaceCharacterIndex - 1);
+ return this.activeEditor.document.lineAt(this.activeEditor.selection.start.line).text.match("^\\s*")[0];
}
protected getTemplatedString(replace: string, template: string, param: string): string {
@@ -81,6 +80,10 @@ export default class CppDocGen implements IDocGen {
}
protected generateReturnParams(): string[] {
+ if (this.cfg.includeTypeAtReturn === false) {
+ return [""];
+ }
+
const params: string[] = [];
// Check if return type is a pointer