Browse Source

Works now without std::min(buffer->get_text.size(), raw_size) it seems.

merge-requests/365/head
eidheim 11 years ago
parent
commit
4e2200ea1b
  1. 3
      juci/source.cc
  2. 1
      juci/source.h

3
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<std::string, std::string> buffers;
notebook_->MapBuffers(&buffers);
buffers[model().file_path()] = raw;

1
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;

Loading…
Cancel
Save