|
|
@@ -423,11 +423,13 @@ void GtkEditor::on_activate() {
|
|
|
sigc::mem_fun(*this, &GtkEditor::on_cursor_blink), BLINK_INTERVAL.count()
|
|
|
);
|
|
|
|
|
|
- // Initialize completion popup
|
|
|
- completion_popup_ = std::make_unique<GtkCompletionPopup>();
|
|
|
- // Popovers are automatically transient and handle their own hide_on_close logic.
|
|
|
- completion_popup_->signal_candidate_selected().connect(sigc::mem_fun(*this, &GtkEditor::on_completion_selected));
|
|
|
- completion_popup_->signal_cancelled().connect(sigc::mem_fun(*this, &GtkEditor::on_completion_cancelled));
|
|
|
+ // Initialize completion popup (conditionally)
|
|
|
+ if (core_ && core_->config().get<bool>("show_completion_popover", true)) {
|
|
|
+ completion_popup_ = std::make_unique<GtkCompletionPopup>();
|
|
|
+ // Popovers are automatically transient and handle their own hide_on_close logic.
|
|
|
+ completion_popup_->signal_candidate_selected().connect(sigc::mem_fun(*this, &GtkEditor::on_completion_selected));
|
|
|
+ completion_popup_->signal_cancelled().connect(sigc::mem_fun(*this, &GtkEditor::on_completion_cancelled));
|
|
|
+ }
|
|
|
|
|
|
// Attach global key controller to the main window
|
|
|
auto global_key_controller = Gtk::EventControllerKey::create();
|
|
|
@@ -668,7 +670,8 @@ Gtk::Widget* GtkEditor::create_widget_for_layout_node(std::shared_ptr<LayoutNode
|
|
|
// === Completion Popup Helpers ===
|
|
|
|
|
|
void GtkEditor::show_completion_popup() {
|
|
|
- if (!completion_popup_ || !window_) return;
|
|
|
+ // Only show if popover is enabled and initialized
|
|
|
+ if (!completion_popup_ || !window_ || !core_->config().get<bool>("show_completion_popover", true)) return;
|
|
|
|
|
|
auto candidates = core_->minibuffer_manager().get_completion_candidates();
|
|
|
if (candidates.empty()) {
|