-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
'Run Selected Text' is not working when a task is stopped #7323
Comments
I did some investigation, and found an intesting behavior in vs code: "Run Selected text" simply echos the selected text in the current terminal which has one task actively running, instead of running the selected text as a command (See the attached GIF). Is it the correct behavior ? In my opninion, the "selected text" should always be run in an interactive terminal, no exceptions. If there is a task running in the current terminal, we should find an interactive terminal, or create an interactive terminal to execute the selected text as a command. What do you think? @RomanNikitenko @vince-fugnitto @akosyakov @eclipse-theia/task-extension |
I agree, I find it odd that vscode would use a busy terminal to display output of “run selected text”. In my opinion, the output would be lost in all the noise of a task which is currently under execution. I think we should opt for the simplest solution which is to look for an idle interactive terminal to run the text or create a terminal if none exist. |
Agree.
|
would this solution work for you?
|
What it a definition of the idle terminal If i don't know about tasks? |
@akosyakov that's why I proposed the solution of "only running selected text in an interactive terminal" and we could use terminalWidget.hasRunningProcesses() to check if an interactive terminal is busy. What do you think? |
Terminal which does not run any task also has a running process (shell). How is it related to terminal be interactive? How do you define terminal interactive? That it can accept a user input? How could you check that a terminal process can accept a user input? |
export interface TerminalWidget {
busy: boolean;
readonly onDidChangeBusy: Event<boolean>;
}
|
Or maybe we can introduce something like I actually like it more, since it looks like terminals running task should disallow running a random user program and |
|
- The selected texts are only run in a user terminal. If the terminal widget that has the focus 1) is not a user terminal, or 2) is a user terminal that has an actively running command, Theia should create a new user terminal and run the selected texts in that new terminal. - fixes eclipse-theia#7323 Signed-off-by: Liang Huang <lhuang4@ualberta.ca>
- The selected texts are only run in a user terminal. If the terminal widget that has the focus 1) is not a user terminal, or 2) is a user terminal that has an actively running command, Theia should create a new user terminal and run the selected texts in that new terminal. - fixes #7323 Signed-off-by: Liang Huang <lhuang4@ualberta.ca>
- The selected texts are only run in a user terminal. If the terminal widget that has the focus 1) is not a user terminal, or 2) is a user terminal that has an actively running command, Theia should create a new user terminal and run the selected texts in that new terminal. - fixes #7323 Signed-off-by: Liang Huang <lhuang4@ualberta.ca>
- The selected texts are only run in a user terminal. If the terminal widget that has the focus 1) is not a user terminal, or 2) is a user terminal that has an actively running command, Theia should create a new user terminal and run the selected texts in that new terminal. - fixes #7323 Signed-off-by: Liang Huang <lhuang4@ualberta.ca>
- The selected texts are only run in a user terminal. If the terminal widget that has the focus 1) is not a user terminal, or 2) is a user terminal that has an actively running command, Theia should create a new user terminal and run the selected texts in that new terminal. - fixes #7323 Signed-off-by: Liang Huang <lhuang4@ualberta.ca>
Description
'Run Selected Text' action is not working when current terminal widget is completed task widget.
Reproduction Steps
Run Selected Text
actionOS and Theia version:
Ubuntu 18.04.1
Theia: ced3f90
Diagnostics:
I guess
Run Selected Text
action tries to use stopped task as current terminal widget.The text was updated successfully, but these errors were encountered: