apommel / vscode-matlab-interactive-terminal

VS Code extension allowing for an interactive Matlab terminal and launching of scripts through Matlab Engine for Python
MIT License
46 stars 10 forks source link

Adding "Cursor Back to Editor" function for "Run Current Selection" #23

Closed weihongliang233 closed 4 years ago

weihongliang233 commented 4 years ago

Every time I use the "run current selection", the cursor goes to the terminal. When I need to continue coding, I have to point to the text manually. I suggest to make it optional. I made some modification to your code and now users can determine whether to make the cursor go back to its original position or just stay in the terminal. When setting the "matlab-interactive-terminal.CursorBack" to true, it looks like: true

As shown in the gif, the cursor stays in the text.

When setting the "matlab-interactive-terminal.CursorBack" to false, it looks like: false

The cursor goes to the terminal. Changing the configuration does't need a restart to take effect.

weihongliang233 commented 4 years ago

A pull request has been created. https://github.com/apommel/vscode-matlab-interactive-terminal/pull/24

apommel commented 4 years ago

Fixed with #24