From e3ce56aa1fc797837623752dcbaf7dece248317d Mon Sep 17 00:00:00 2001 From: eidheim Date: Sat, 11 Jul 2015 17:58:45 +0200 Subject: [PATCH] Minor cleanup. --- juci/source.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/juci/source.cc b/juci/source.cc index 70ced96..426c97e 100644 --- a/juci/source.cc +++ b/juci/source.cc @@ -587,8 +587,6 @@ bool Source::ClangView::on_key_press_event(GdkEventKey* key) { Source::ClangViewAutocomplete::ClangViewAutocomplete(const std::string& file_path, const std::string& project_path, Terminal::Controller& terminal): Source::ClangView(file_path, project_path, terminal), selection_dialog(*this) { get_buffer()->signal_changed().connect([this](){ - if(autocomplete_running || selection_dialog.shown) - delayed_reparse_connection.disconnect(); if(!selection_dialog.shown) { auto insert=get_buffer()->get_insert(); auto iter=insert->get_iter(); @@ -609,6 +607,9 @@ Source::ClangView(file_path, project_path, terminal), selection_dialog(*this) { else if(autocomplete_running) cancel_show_autocomplete=true; } + if(autocomplete_running || selection_dialog.shown) + delayed_reparse_connection.disconnect(); + }); get_buffer()->signal_mark_set().connect([this](const Gtk::TextBuffer::iterator& iterator, const Glib::RefPtr& mark){ if(mark->get_name()=="insert") { @@ -643,7 +644,6 @@ bool Source::ClangViewAutocomplete::on_key_press_event(GdkEventKey *key) { return ClangView::on_key_press_event(key); } void Source::ClangViewAutocomplete::start_autocomplete() { - delayed_reparse_connection.disconnect(); if(!autocomplete_running) { autocomplete_running=true; cancel_show_autocomplete=false;