Skip to content

Commit

Permalink
Merge pull request #414 from irgolic/store-updated-prompt
Browse files Browse the repository at this point in the history
Set updated prompt as previous prompt object in JupyterWidget
  • Loading branch information
ccordoba12 committed Mar 25, 2020
2 parents 2e3a17b + 482a9d6 commit ad21b6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions qtconsole/jupyter_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,10 @@ def _update_prompt(self, new_prompt_number):
# Update the prompt cursor
self._prompt_cursor.setPosition(cursor.position() - 1)

# Store the updated prompt.
block = self._control.document().lastBlock()
length = len(self._prompt)
self._previous_prompt_obj = self._PromptBlock(block, length, new_prompt_number)

def _show_interpreter_prompt_for_reply(self, msg):
""" Reimplemented for IPython-style prompts.
Expand Down

0 comments on commit ad21b6c

Please sign in to comment.