Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal Plugin API: by default, add a new line to the text being sent to the terminal #3267

Merged
merged 1 commit into from
Oct 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## v0.3.16
- [plug-in] added `DocumentLinkProvider` Plug-in API
- [plug-in] Terminal.sendText API adds a new line to the text being sent to the terminal if `addNewLine` parameter wasn't specified


## v0.3.15
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-ext/src/plugin/terminal-ext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class TerminalExtImpl implements Terminal {
this.termProcessId = this.proxy.$createTerminal(nameOrOptions);
}

sendText(text: string, addNewLine?: boolean): void {
sendText(text: string, addNewLine: boolean = true): void {
azatsarynnyy marked this conversation as resolved.
Show resolved Hide resolved
this.termProcessId.then(id => this.proxy.$sendText(id, text, addNewLine));
}

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin/src/theia.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,7 @@ declare module '@theia/plugin' {
/**
* Send text to the terminal.
* @param text - text content.
* @param addNewLine - in case true - apply new line after the text, otherwise don't apply new line.
* @param addNewLine - in case true - apply new line after the text, otherwise don't apply new line. This defaults to `true`.
*/
sendText(text: string, addNewLine?: boolean): void;

Expand Down