Skip to content

Commit d55c2c1

Browse files
Kapil Borledaviwil
authored andcommitted
Trim the last empty line from comment help block
1 parent 1850b3e commit d55c2c1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/features/HelpCompletion.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,13 @@ export class HelpCompletionFeature implements IFeature {
103103
return;
104104
}
105105

106-
// todo remove the new line after help block
107106
// todo get the eol character programmatically or let the server return one whole string
108107
// todo add indentation level to the help content
109108
let editor = vscode.window.activeTextEditor;
110109
let replaceRange = new vscode.Range(triggerStartPos.translate(0, -1), triggerStartPos.translate(0, 1));
111-
let text = content.join("\r\n");
110+
111+
// Trim the last empty line and join the strings.
112+
let text = content.slice(0, -1).join("\r\n");
112113
editor.edit(editBuilder => editBuilder.replace(replaceRange, text));
113114
});
114115
}

0 commit comments

Comments
 (0)