forked from 1b-agent/opencadstudio-upstream
Merge pull request #1624 from yztink/fix/script-repeat-last-cmd
A blank script line outside a command repeats the last command.
This commit is contained in:
commit
59b76ada5c
2 files changed
+47
-1
No files matched your search
@@ -1177,7 +1177,13 @@ impl OpenCADStudio {
|
||||
|
||||
// 2. Blank line submits Enter to the active command (or repeats last).
|
||||
if trimmed.is_empty() {
|
||||
return self.feed_command(StepInput::Enter);
|
||||
if self.tabs[i].active_cmd.is_some() {
|
||||
return self.feed_command(StepInput::Enter);
|
||||
}
|
||||
if let Some(cmd) = self.tabs[i].last_cmd.clone() {
|
||||
return self.run_command_line(&cmd);
|
||||
}
|
||||
return Task::none();
|
||||
}
|
||||
|
||||
// 3. A command is currently active: route to its prompt handlers.
|
||||
|
||||
Reference in new issue
Block a user