message: Remove setDOMValueProgrammatically.
diff: @@ -80,14 +80,14 @@ export class PromptComponent extends React.Component<Props, State> {
  }
  clear(): void {
  - this.setText("");
  + this.setValue("");
  }
  async appendLastLArgumentOfPreviousCommand(): Promise<void> {
  const latestHistoryRecord = services.history.latest;
  if (latestHistoryRecord) {
  - this.setText(this.prompt.value + _.last(scan(latestHistoryRecord.command))!.value);
  + this.setValue(this.prompt.value + _.last(scan(latestHistoryRecord.command))!.value);
  }
  }
  @@ -98,7 +98,6 @@ export class PromptComponent extends React.Component<Props, State> {
  if (!this.isEmpty()) {
  this.props.session.createJob(this.prompt);
  this.editor.setValue("");
  - this.setDOMValueProgrammatically("");
  this.setState({
  displayedHistoryRecordID: undefined,
  });
  @@ -115,13 +114,13 @@ export class PromptComponent extends React.Component<Props, State> {
  );
  if (previousRecord) {
  - this.setText(previousRecord.command);
  + this.setValue(previousRecord.command);
  this.setState({displayedHistoryRecordID: previousRecord.id});
  }
  } else {
  const previousRecord = services.history.latest;
  if (previousRecord) {
  - this.setText(previousRecord.command);
  + this.setValue(previousRecord.command);
  this.setState({displayedHistoryRecordID: previousRecord.id});
  }
  }
  @@ -136,18 +135,18 @@ export class PromptComponent extends React.Component<Props, State> {
  record => record.id > currentID && record.command !== currentRecord.command,
  );
  if (nextRecord) {
  - this.setText(nextRecord.command);
  + this.setValue(nextRecord.command);
  this.setState({displayedHistoryRecordID: nextRecord.id});
  } else {
  - this.setText("");
  + this.setValue("");
  this.setState({displayedHistoryRecordID: undefined});
  }
  }
  }
  - private setText(text: string): void {
  - this.prompt.setValue(text);
  - this.setDOMValueProgrammatically(text);
  + private setValue(value: string): void {
  + this.editor.setValue(value);
  + this.prompt.setValue(value);
  }
  private get promptContentNode(): HTMLDivElement {
  @@ -160,22 +159,6 @@ export class PromptComponent extends React.Component<Props, State> {
  return this.refs["command"] as HTMLInputElement;
  }
  - private setDOMValueProgrammatically(_text: string): void {
  - // this.commandNode.innerText = text;
  - // const newCaretPosition = text.length;
  - // /**
  - // * Without this line caret position is incorrect when you click on a suggestion
  - // * because the prompt temporarily loses focus and then restores the previous position.
  - // */
  - // (this.state as any).caretPositionFromPreviousFocus = newCaretPosition;
  - //
  - // if (text.length) {
  - // setCaretPosition(this.commandNode, newCaretPosition);
  - // }
  - //
  - // this.setState({suggestions: [], highlightedSuggestionIndex: 0});
  - }
  -
  private isEmpty(): boolean {
  return this.prompt.value.replace(/\s/g, "").length === 0;
  }
  