Feat: UI/UX fixes + removing clones from places

This commit is contained in:
2026-03-05 00:15:51 +01:00
parent 35370a6f2c
commit 60fb62829f
17 changed files with 1817 additions and 290 deletions

View File

@@ -1,5 +1,7 @@
//! Forth script compilation, evaluation, and editor ↔ step synchronization.
use std::sync::Arc;
use crossbeam_channel::Sender;
use crate::engine::LinkState;
@@ -55,7 +57,7 @@ impl App {
script.lines().map(String::from).collect()
};
self.editor_ctx.editor.set_content(lines);
self.editor_ctx.editor.set_candidates(COMPLETION_CANDIDATES.clone());
self.editor_ctx.editor.set_candidates(Arc::clone(&COMPLETION_CANDIDATES));
self.editor_ctx
.editor
.set_completion_enabled(self.ui.show_completion);
@@ -87,7 +89,7 @@ impl App {
prelude.lines().map(String::from).collect()
};
self.editor_ctx.editor.set_content(lines);
self.editor_ctx.editor.set_candidates(COMPLETION_CANDIDATES.clone());
self.editor_ctx.editor.set_candidates(Arc::clone(&COMPLETION_CANDIDATES));
self.editor_ctx
.editor
.set_completion_enabled(self.ui.show_completion);
@@ -190,7 +192,7 @@ impl App {
script.lines().map(String::from).collect()
};
self.script_editor.editor.set_content(lines);
self.script_editor.editor.set_candidates(COMPLETION_CANDIDATES.clone());
self.script_editor.editor.set_candidates(Arc::clone(&COMPLETION_CANDIDATES));
self.script_editor
.editor
.set_completion_enabled(self.ui.show_completion);