Feat: UI/UX fixes + removing clones from places
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user