forked from 1b-agent/opencadstudio-upstream
fix(commands): record last_cmd on plugin dispatch to repeat on Enter
When a plugin command was dispatched, record_recent was called but tabs[i].last_cmd was never set. Consequently, pressing Enter or Space on an empty command line after running a plugin command failed to repeat it. This records tabs[i].last_cmd on plugin dispatch and requests command-line focus and dynamic input syncing when an interactive plugin command starts.
This commit is contained in:
1 parent
460a4c9cc5
commit
7c0af700e8
2 files changed
+43
-2
No files matched your search
@@ -731,6 +731,8 @@ impl OpenCADStudio {
|
||||
// (`LINE`), so the full line is not a plugin command and falls through to
|
||||
// the first-word + fed-tokens path below. (#162)
|
||||
if !self.suppress_plugin_dispatch && crate::plugin::try_dispatch(self, i, cmd) {
|
||||
self.tabs[i].last_cmd = Some(cmd.to_string());
|
||||
self.command_line.record_recent(cmd);
|
||||
let toks: Vec<String> = tokens.iter().map(|s| s.to_string()).collect();
|
||||
return self.finish_active_command(&toks, finish);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user