fix: pass missing config to setTimeout in getSpareTab (#1627)

- Fixed an issue where `fullConfig` was not passed to `setTimeout` in
`getSpareTab`.
- Wrapped `ensureHotSpareTab` with an arrow function to ensure
`fullConfig` is properly passed.

**When I use wave as my terminal, sometimes the setting does not work. I
read the source code and found this issue**

Co-authored-by: Evan Simkowitz <esimkowitz@users.noreply.github.com>
This commit is contained in:
bqxbqx 2024-12-27 00:17:13 +08:00 committed by GitHub
parent 9c8084a063
commit d833f57214
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -263,7 +263,7 @@ export function ensureHotSpareTab(fullConfig: FullConfigType) {
}
export function getSpareTab(fullConfig: FullConfigType): WaveTabView {
setTimeout(ensureHotSpareTab, 500);
setTimeout(() => ensureHotSpareTab(fullConfig), 500);
if (HotSpareTab != null) {
const rtn = HotSpareTab;
HotSpareTab = null;