From 4e2200ea1bf7bb729a746250eb5a6297a45987b2 Mon Sep 17 00:00:00 2001 From: eidheim Date: Mon, 8 Jun 2015 10:38:38 +0200 Subject: [PATCH] Works now without std::min(buffer->get_text.size(), raw_size) it seems. --- juci/source.cc | 3 +-- juci/source.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/juci/source.cc b/juci/source.cc index c3241f0..44d05e0 100644 --- a/juci/source.cc +++ b/juci/source.cc @@ -359,7 +359,7 @@ void Source::Controller::OnOpenFile(const string &filepath) { parsing_done.connect([this](){ INFO("Updating syntax"); view(). - OnUpdateSyntax(model().ExtractTokens(0, std::min(buffer()->get_text().size(), raw_size)), + OnUpdateSyntax(model().ExtractTokens(0, buffer()->get_text().size()), model().config()); INFO("Syntax updated"); }); @@ -370,7 +370,6 @@ void Source::Controller::OnOpenFile(const string &filepath) { INFO("Starting parsing"); while (true) { const std::string raw = buffer()->get_text().raw(); - raw_size=raw.size(); std::map buffers; notebook_->MapBuffers(&buffers); buffers[model().file_path()] = raw; diff --git a/juci/source.h b/juci/source.h index b1c417b..955b695 100644 --- a/juci/source.h +++ b/juci/source.h @@ -164,7 +164,6 @@ namespace Source { void OnSaveFile(); std::mutex parsing; Glib::Dispatcher parsing_done; - size_t raw_size=0; bool is_saved_ = false; bool is_changed_ = false;