Browse Source

Added Prettier tooltips, and cleanup of src/source* files

merge-requests/382/head
eidheim 8 years ago
parent
commit
9693bcea34
  1. 2
      README.md
  2. 2
      libclangmm
  3. 1
      src/notebook.cc
  4. 1312
      src/source.cc
  5. 12
      src/source.h
  6. 186
      src/source_base.cc
  7. 23
      src/source_base.h
  8. 50
      src/source_clang.cc
  9. 1
      src/source_clang.h
  10. 1
      src/source_diff.h
  11. 57
      src/source_language_protocol.cc
  12. 2
      src/source_language_protocol.h

2
README.md

@ -39,7 +39,7 @@ See [language-server-protocol/specification.md](https://github.com/Microsoft/lan
* Regex search and replace
* Smart paste, keys and indentation
* Multiple cursors
* Auto-indentation of C++ file buffers through [clang-format](http://clang.llvm.org/docs/ClangFormat.html)
* Auto-indentation through [clang-format](http://clang.llvm.org/docs/ClangFormat.html) or [Prettier](https://github.com/prettier/prettier) if installed
* Source minimap
* Split view
* Multiple cursors

2
libclangmm

@ -1 +1 @@
Subproject commit 997d02a8de78ff879577a3522e1de5ebec9802e7
Subproject commit e8f8a04f98b2259468d50843759caac3c5922bfa

1
src/notebook.cc

@ -120,6 +120,7 @@ void Notebook::open(const boost::filesystem::path &file_path_, size_t notebook_i
if(notebook_index==1 && !split)
toggle_split();
// Use canonical path to follow symbolic links
boost::system::error_code ec;
auto canonical_file_path=boost::filesystem::canonical(file_path, ec);
if(ec)

1312
src/source.cc

File diff suppressed because it is too large Load Diff

12
src/source.h

@ -42,7 +42,7 @@ namespace Source {
static std::unordered_set<View*> non_deleted_views;
static std::unordered_set<View*> views;
View(const boost::filesystem::path &file_path, Glib::RefPtr<Gsv::Language> language);
View(const boost::filesystem::path &file_path, Glib::RefPtr<Gsv::Language> language, bool is_generic_view=false);
~View();
bool save() override;
@ -77,8 +77,6 @@ namespace Source {
std::function<std::tuple<Source::Offset, std::string, size_t>()> get_documentation_template;
std::function<void(int)> toggle_breakpoint;
Gtk::TextIter get_iter_for_dialog();
void hide_tooltips() override;
void hide_dialogs() override;
@ -90,15 +88,16 @@ namespace Source {
virtual void soft_reparse(bool delayed=false) {soft_reparse_needed=false;}
virtual void full_reparse() {full_reparse_needed=false;}
protected:
bool parsed=false;
bool parsed=true;
Tooltips diagnostic_tooltips;
Tooltips type_tooltips;
sigc::connection delayed_tooltips_connection;
virtual void show_diagnostic_tooltips(const Gdk::Rectangle &rectangle) { diagnostic_tooltips.show(rectangle); }
void add_diagnostic_tooltip(const Gtk::TextIter &start, const Gtk::TextIter &end, std::string spelling, bool error);
void clear_diagnostic_tooltips();
virtual void show_type_tooltips(const Gdk::Rectangle &rectangle) {}
gdouble on_motion_last_x=0.0;
gdouble on_motion_last_y=0.0;
void set_tooltip_and_dialog_events();
/// Usually returns at start of line, but not always
Gtk::TextIter find_start_of_sentence(Gtk::TextIter iter);
@ -130,6 +129,9 @@ namespace Source {
guint previous_non_modifier_keyval=0;
private:
void setup_tooltip_and_dialog_events();
void setup_format_style(bool is_generic_view);
void cleanup_whitespace_characters();
Gsv::DrawSpacesFlags parse_show_whitespace_characters(const std::string &text);

186
src/source_base.cc

@ -15,39 +15,7 @@ Source::BaseView::BaseView(const boost::filesystem::path &file_path, Glib::RefPt
return false;
});
#ifdef __APPLE__ // TODO: Gio file monitor is bugged on MacOS
class Recursive {
public:
static void f(BaseView *view, std::time_t last_write_time_) {
view->delayed_monitor_changed_connection.disconnect();
view->delayed_monitor_changed_connection=Glib::signal_timeout().connect([view, last_write_time_]() {
boost::system::error_code ec;
auto last_write_time=boost::filesystem::last_write_time(view->file_path, ec);
if(last_write_time!=last_write_time_)
view->check_last_write_time(last_write_time);
Recursive::f(view, last_write_time);
return false;
}, 1000);
}
};
if(this->last_write_time!=static_cast<std::time_t>(-1))
Recursive::f(this, last_write_time);
#else
if(this->last_write_time!=static_cast<std::time_t>(-1)) {
monitor=Gio::File::create_for_path(file_path.string())->monitor_file(Gio::FileMonitorFlags::FILE_MONITOR_NONE);
monitor_changed_connection=monitor->signal_changed().connect([this](const Glib::RefPtr<Gio::File> &file,
const Glib::RefPtr<Gio::File>&,
Gio::FileMonitorEvent monitor_event) {
if(monitor_event!=Gio::FileMonitorEvent::FILE_MONITOR_EVENT_CHANGES_DONE_HINT) {
delayed_monitor_changed_connection.disconnect();
delayed_monitor_changed_connection=Glib::signal_timeout().connect([this]() {
check_last_write_time();
return false;
}, 500);
}
});
}
#endif
monitor_file();
}
Source::BaseView::~BaseView() {
@ -204,6 +172,92 @@ void Source::BaseView::rename(const boost::filesystem::path &path) {
update_tab_label(this);
}
void Source::BaseView::monitor_file() {
#ifdef __APPLE__ // TODO: Gio file monitor is bugged on MacOS
class Recursive {
public:
static void f(BaseView *view, std::time_t last_write_time_) {
view->delayed_monitor_changed_connection.disconnect();
view->delayed_monitor_changed_connection=Glib::signal_timeout().connect([view, last_write_time_]() {
boost::system::error_code ec;
auto last_write_time=boost::filesystem::last_write_time(view->file_path, ec);
if(last_write_time!=last_write_time_)
view->check_last_write_time(last_write_time);
Recursive::f(view, last_write_time);
return false;
}, 1000);
}
};
delayed_monitor_changed_connection.disconnect();
if(this->last_write_time!=static_cast<std::time_t>(-1))
Recursive::f(this, last_write_time);
#else
if(this->last_write_time!=static_cast<std::time_t>(-1)) {
monitor=Gio::File::create_for_path(file_path.string())->monitor_file(Gio::FileMonitorFlags::FILE_MONITOR_NONE);
monitor_changed_connection.disconnect();
monitor_changed_connection=monitor->signal_changed().connect([this](const Glib::RefPtr<Gio::File> &file,
const Glib::RefPtr<Gio::File>&,
Gio::FileMonitorEvent monitor_event) {
if(monitor_event!=Gio::FileMonitorEvent::FILE_MONITOR_EVENT_CHANGES_DONE_HINT) {
delayed_monitor_changed_connection.disconnect();
delayed_monitor_changed_connection=Glib::signal_timeout().connect([this]() {
check_last_write_time();
return false;
}, 500);
}
});
}
#endif
}
void Source::BaseView::check_last_write_time(std::time_t last_write_time_) {
if(this->last_write_time==static_cast<std::time_t>(-1))
return;
if(Config::get().source.auto_reload_changed_files && !get_buffer()->get_modified()) {
boost::system::error_code ec;
auto last_write_time=last_write_time_!=static_cast<std::time_t>(-1) ? last_write_time_ : boost::filesystem::last_write_time(file_path, ec);
if(!ec && last_write_time!=this->last_write_time) {
if(load()) {
get_buffer()->set_modified(false);
return;
}
}
}
else if(has_focus()) {
boost::system::error_code ec;
auto last_write_time=last_write_time_!=static_cast<std::time_t>(-1) ? last_write_time_ : boost::filesystem::last_write_time(file_path, ec);
if(!ec && last_write_time!=this->last_write_time)
Info::get().print("Caution: " + file_path.filename().string() + " was changed outside of juCi++");
}
}
Gtk::TextIter Source::BaseView::get_iter_at_line_pos(int line, int pos) {
return get_iter_at_line_index(line, pos);
}
Gtk::TextIter Source::BaseView::get_iter_at_line_offset(int line, int offset) {
line=std::min(line, get_buffer()->get_line_count()-1);
if(line<0)
line=0;
auto iter=get_iter_at_line_end(line);
offset=std::min(offset, iter.get_line_offset());
if(offset<0)
offset=0;
return get_buffer()->get_iter_at_line_offset(line, offset);
}
Gtk::TextIter Source::BaseView::get_iter_at_line_index(int line, int index) {
line=std::min(line, get_buffer()->get_line_count()-1);
if(line<0)
line=0;
auto iter=get_iter_at_line_end(line);
index=std::min(index, iter.get_line_index());
if(index<0)
index=0;
return get_buffer()->get_iter_at_line_index(line, index);
}
Gtk::TextIter Source::BaseView::get_iter_at_line_end(int line_nr) {
if(line_nr>=get_buffer()->get_line_count())
return get_buffer()->end();
@ -221,15 +275,20 @@ Gtk::TextIter Source::BaseView::get_iter_at_line_end(int line_nr) {
}
}
Gtk::TextIter Source::BaseView::get_iter_at_line_pos(int line, int pos) {
line=std::min(line, get_buffer()->get_line_count()-1);
if(line<0)
line=0;
auto iter=get_iter_at_line_end(line);
pos=std::min(pos, iter.get_line_index());
if(pos<0)
pos=0;
return get_buffer()->get_iter_at_line_index(line, pos);
Gtk::TextIter Source::BaseView::get_iter_for_dialog() {
auto iter=get_buffer()->get_insert()->get_iter();
Gdk::Rectangle visible_rect;
get_visible_rect(visible_rect);
Gdk::Rectangle iter_rect;
get_iter_location(iter, iter_rect);
iter_rect.set_width(1);
if(iter.get_line_offset()>=80) {
get_iter_at_location(iter, visible_rect.get_x(), iter_rect.get_y());
get_iter_location(iter, iter_rect);
}
if(!visible_rect.intersects(iter_rect))
get_iter_at_location(iter, visible_rect.get_x(), visible_rect.get_y()+visible_rect.get_height()/3);
return iter;
}
void Source::BaseView::place_cursor_at_line_pos(int line, int pos) {
@ -237,21 +296,11 @@ void Source::BaseView::place_cursor_at_line_pos(int line, int pos) {
}
void Source::BaseView::place_cursor_at_line_offset(int line, int offset) {
line=std::min(line, get_buffer()->get_line_count()-1);
if(line<0)
line=0;
auto iter=get_iter_at_line_end(line);
offset=std::min(offset, iter.get_line_offset());
get_buffer()->place_cursor(get_buffer()->get_iter_at_line_offset(line, offset));
get_buffer()->place_cursor(get_iter_at_line_offset(line, offset));
}
void Source::BaseView::place_cursor_at_line_index(int line, int index) {
line=std::min(line, get_buffer()->get_line_count()-1);
if(line<0)
line=0;
auto iter=get_iter_at_line_end(line);
index=std::min(index, iter.get_line_index());
get_buffer()->place_cursor(get_buffer()->get_iter_at_line_index(line, index));
get_buffer()->place_cursor(get_iter_at_line_index(line, index));
}
Gtk::TextIter Source::BaseView::get_smart_home_iter(const Gtk::TextIter &iter) {
@ -266,6 +315,7 @@ Gtk::TextIter Source::BaseView::get_smart_home_iter(const Gtk::TextIter &iter) {
else
return start_line_iter;
}
Gtk::TextIter Source::BaseView::get_smart_end_iter(const Gtk::TextIter &iter) {
auto end_line_iter=get_iter_at_line_end(iter.get_line());
auto end_sentence_iter=end_line_iter;
@ -324,24 +374,20 @@ Gtk::TextIter Source::BaseView::get_tabs_end_iter() {
return get_tabs_end_iter(get_buffer()->get_insert());
}
void Source::BaseView::check_last_write_time(std::time_t last_write_time_) {
if(this->last_write_time==static_cast<std::time_t>(-1))
return;
if(Config::get().source.auto_reload_changed_files && !get_buffer()->get_modified()) {
boost::system::error_code ec;
auto last_write_time=last_write_time_!=static_cast<std::time_t>(-1) ? last_write_time_ : boost::filesystem::last_write_time(file_path, ec);
if(!ec && last_write_time!=this->last_write_time) {
if(load()) {
get_buffer()->set_modified(false);
void Source::BaseView::place_cursor_at_next_diagnostic() {
auto insert_offset=get_buffer()->get_insert()->get_iter().get_offset();
for(auto offset: diagnostic_offsets) {
if(offset>insert_offset) {
get_buffer()->place_cursor(get_buffer()->get_iter_at_offset(offset));
scroll_to(get_buffer()->get_insert(), 0.0, 1.0, 0.5);
return;
}
}
}
else if(has_focus()) {
boost::system::error_code ec;
auto last_write_time=last_write_time_!=static_cast<std::time_t>(-1) ? last_write_time_ : boost::filesystem::last_write_time(file_path, ec);
if(!ec && last_write_time!=this->last_write_time)
Info::get().print("Caution: " + file_path.filename().string() + " was changed outside of juCi++");
if(diagnostic_offsets.size()==0)
Info::get().print("No diagnostics found in current buffer");
else {
auto iter=get_buffer()->get_iter_at_offset(*diagnostic_offsets.begin());
get_buffer()->place_cursor(iter);
scroll_to(get_buffer()->get_insert(), 0.0, 1.0, 0.5);
}
}

23
src/source_base.h

@ -2,6 +2,7 @@
#include <gtksourceviewmm.h>
#include <mutex>
#include <set>
#include <boost/filesystem.hpp>
namespace Source {
@ -29,10 +30,16 @@ namespace Source {
std::function<void(BaseView* view, bool center, bool show_tooltips)> scroll_to_cursor_delayed=[](BaseView* view, bool center, bool show_tooltips) {};
/// Safely returns iter given line and an offset using either byte index or character offset. Defaults to using byte index.
virtual Gtk::TextIter get_iter_at_line_pos(int line, int pos);
/// Safely returns iter given line and character offset
Gtk::TextIter get_iter_at_line_offset(int line, int offset);
/// Safely returns iter given line and byte index
Gtk::TextIter get_iter_at_line_index(int line, int index);
Gtk::TextIter get_iter_at_line_end(int line_nr);
Gtk::TextIter get_iter_for_dialog();
/// Safely returns iter at a line at an offset using either byte index or character offset. Defaults to using byte index.
virtual Gtk::TextIter get_iter_at_line_pos(int line, int pos);
/// Safely places cursor at line using get_iter_at_line_pos.
void place_cursor_at_line_pos(int line, int pos);
/// Safely places cursor at line offset
@ -40,6 +47,11 @@ namespace Source {
/// Safely places cursor at line index
void place_cursor_at_line_index(int line, int index);
protected:
std::time_t last_write_time;
void monitor_file();
void check_last_write_time(std::time_t last_write_time_=static_cast<std::time_t>(-1));
/// Move iter to line start. Depending on iter position, before or after indentation.
/// Works with wrapped lines.
Gtk::TextIter get_smart_home_iter(const Gtk::TextIter &iter);
@ -60,6 +72,9 @@ namespace Source {
Gtk::TextIter get_tabs_end_iter(int line_nr);
Gtk::TextIter get_tabs_end_iter();
std::set<int> diagnostic_offsets;
void place_cursor_at_next_diagnostic();
public:
std::function<void(BaseView *view)> update_tab_label;
std::function<void(BaseView *view)> update_status_location;
std::function<void(BaseView *view)> update_status_file_path;
@ -71,9 +86,5 @@ namespace Source {
std::string status_branch;
bool disable_spellcheck=false;
protected:
std::time_t last_write_time;
void check_last_write_time(std::time_t last_write_time_=static_cast<std::time_t>(-1));
};
}

50
src/source_clang.cc

@ -265,11 +265,8 @@ void Source::ClangViewParse::update_syntax() {
}
void Source::ClangViewParse::update_diagnostics() {
diagnostic_offsets.clear();
diagnostic_tooltips.clear();
clear_diagnostic_tooltips();
fix_its.clear();
get_buffer()->remove_tag_by_name("def:warning_underline", get_buffer()->begin(), get_buffer()->end());
get_buffer()->remove_tag_by_name("def:error_underline", get_buffer()->begin(), get_buffer()->end());
size_t num_warnings=0;
size_t num_errors=0;
size_t num_fix_its=0;
@ -296,19 +293,18 @@ void Source::ClangViewParse::update_diagnostics() {
if(index>=0 && index<end.get_line_index())
end=get_buffer()->get_iter_at_line_index(line, index);
std::string diagnostic_tag_name;
if(diagnostic.severity<=CXDiagnostic_Warning) {
diagnostic_tag_name="def:warning";
bool error=false;
std::string severity_tag_name;
if(diagnostic.severity<=clangmm::Diagnostic::Severity::Warning) {
severity_tag_name="def:warning";
num_warnings++;
}
else {
diagnostic_tag_name="def:error";
severity_tag_name="def:error";
num_errors++;
error=true;
}
auto spelling=diagnostic.spelling;
auto severity_spelling=diagnostic.severity_spelling;
std::string fix_its_string;
unsigned fix_its_count=0;
for(auto &fix_it: diagnostic.fix_its) {
@ -333,23 +329,15 @@ void Source::ClangViewParse::update_diagnostics() {
else if(fix_its_count>1)
fix_its_string.insert(0, "Fix-its:\n");
auto create_tooltip_buffer=[this, spelling, severity_spelling, diagnostic_tag_name, fix_its_string]() {
auto tooltip_buffer=Gtk::TextBuffer::create(get_buffer()->get_tag_table());
tooltip_buffer->insert_with_tag(tooltip_buffer->get_insert()->get_iter(), severity_spelling, diagnostic_tag_name);
tooltip_buffer->insert_with_tag(tooltip_buffer->get_insert()->get_iter(), ":\n"+spelling, "def:note");
if(fix_its_string.size()>0) {
tooltip_buffer->insert_with_tag(tooltip_buffer->get_insert()->get_iter(), ":\n\n"+fix_its_string, "def:note");
}
return tooltip_buffer;
};
diagnostic_tooltips.emplace_back(create_tooltip_buffer, this, get_buffer()->create_mark(start), get_buffer()->create_mark(end));
if(!fix_its_string.empty())
diagnostic.spelling+="\n\n"+fix_its_string;
add_diagnostic_tooltip(start, end, diagnostic.spelling, error);
get_buffer()->apply_tag_by_name(diagnostic_tag_name+"_underline", start, end);
auto iter=get_buffer()->get_insert()->get_iter();
if(iter.ends_line()) {
auto next_iter=iter;
if(next_iter.forward_char())
get_buffer()->remove_tag_by_name(diagnostic_tag_name+"_underline", iter, next_iter);
get_buffer()->remove_tag_by_name(severity_tag_name+"_underline", iter, next_iter);
}
}
}
@ -1616,21 +1604,7 @@ Source::ClangViewRefactor::ClangViewRefactor(const boost::filesystem::path &file
Info::get().print("Buffer is parsing");
return;
}
auto insert_offset=get_buffer()->get_insert()->get_iter().get_offset();
for(auto offset: diagnostic_offsets) {
if(offset>insert_offset) {
get_buffer()->place_cursor(get_buffer()->get_iter_at_offset(offset));
scroll_to(get_buffer()->get_insert(), 0.0, 1.0, 0.5);
return;
}
}
if(diagnostic_offsets.size()==0)
Info::get().print("No diagnostics found in current buffer");
else {
auto iter=get_buffer()->get_iter_at_offset(*diagnostic_offsets.begin());
get_buffer()->place_cursor(iter);
scroll_to(get_buffer()->get_insert(), 0.0, 1.0, 0.5);
}
place_cursor_at_next_diagnostic();
};
get_fix_its=[this]() {

1
src/source_clang.h

@ -32,7 +32,6 @@ namespace Source {
void show_type_tooltips(const Gdk::Rectangle &rectangle) override;
std::set<int> diagnostic_offsets;
std::vector<FixIt> fix_its;
std::thread parse_thread;

1
src/source_diff.h

@ -39,6 +39,7 @@ namespace Source {
void git_goto_next_diff();
std::string git_get_diff_details();
/// Use canonical path to follow symbolic links
boost::filesystem::path canonical_file_path;
private:
std::mutex canonical_file_path_mutex;

57
src/source_language_protocol.cc

@ -322,7 +322,6 @@ Source::LanguageProtocolView::LanguageProtocolView(const boost::filesystem::path
configure();
get_source_buffer()->set_language(language);
get_source_buffer()->set_highlight_syntax(true);
parsed=true;
similar_symbol_tag=get_buffer()->create_tag();
similar_symbol_tag->property_weight()=Pango::WEIGHT_ULTRAHEAVY;
@ -829,21 +828,7 @@ void Source::LanguageProtocolView::setup_navigation_and_refactoring() {
}
goto_next_diagnostic=[this]() {
auto insert_offset=get_buffer()->get_insert()->get_iter().get_offset();
for(auto offset: diagnostic_offsets) {
if(offset>insert_offset) {
get_buffer()->place_cursor(get_buffer()->get_iter_at_offset(offset));
scroll_to(get_buffer()->get_insert(), 0.0, 1.0, 0.5);
return;
}
}
if(diagnostic_offsets.size()==0)
Info::get().print("No diagnostics found in current buffer");
else {
auto iter=get_buffer()->get_iter_at_offset(*diagnostic_offsets.begin());
get_buffer()->place_cursor(iter);
scroll_to(get_buffer()->get_insert(), 0.0, 1.0, 0.5);
}
place_cursor_at_next_diagnostic();
};
}
@ -879,10 +864,7 @@ void Source::LanguageProtocolView::unescape_text(std::string &text) {
void Source::LanguageProtocolView::update_diagnostics(std::vector<LanguageProtocol::Diagnostic> &&diagnostics) {
dispatcher.post([this, diagnostics=std::move(diagnostics)] {
diagnostic_offsets.clear();
diagnostic_tooltips.clear();
get_buffer()->remove_tag_by_name("def:warning_underline", get_buffer()->begin(), get_buffer()->end());
get_buffer()->remove_tag_by_name("def:error_underline", get_buffer()->begin(), get_buffer()->end());
clear_diagnostic_tooltips();
size_t num_warnings=0;
size_t num_errors=0;
size_t num_fix_its=0;
@ -898,37 +880,25 @@ void Source::LanguageProtocolView::update_diagnostics(std::vector<LanguageProtoc
start.forward_char();
}
diagnostic_offsets.emplace(start.get_offset());
std::string diagnostic_tag_name;
std::string severity_spelling;
bool error=false;
std::string severity_tag_name;
if(diagnostic.severity>=2) {
severity_spelling="Warning";
diagnostic_tag_name="def:warning";
severity_tag_name="def:warning";
num_warnings++;
}
else {
severity_spelling="Error";
diagnostic_tag_name="def:error";
severity_tag_name="def:error";
num_errors++;
error=true;
}
auto spelling=diagnostic.spelling;
auto create_tooltip_buffer=[this, spelling, severity_spelling, diagnostic_tag_name]() {
auto tooltip_buffer=Gtk::TextBuffer::create(get_buffer()->get_tag_table());
tooltip_buffer->insert_with_tag(tooltip_buffer->get_insert()->get_iter(), severity_spelling, diagnostic_tag_name);
tooltip_buffer->insert_with_tag(tooltip_buffer->get_insert()->get_iter(), ":\n"+spelling, "def:note");
return tooltip_buffer;
};
diagnostic_tooltips.emplace_back(create_tooltip_buffer, this, get_buffer()->create_mark(start), get_buffer()->create_mark(end));
add_diagnostic_tooltip(start, end, diagnostic.spelling, error);
get_buffer()->apply_tag_by_name(diagnostic_tag_name+"_underline", start, end);
auto iter=get_buffer()->get_insert()->get_iter();
if(iter.ends_line()) {
auto next_iter=iter;
if(next_iter.forward_char())
get_buffer()->remove_tag_by_name(diagnostic_tag_name+"_underline", iter, next_iter);
get_buffer()->remove_tag_by_name(severity_tag_name+"_underline", iter, next_iter);
}
}
}
@ -939,14 +909,7 @@ void Source::LanguageProtocolView::update_diagnostics(std::vector<LanguageProtoc
}
Gtk::TextIter Source::LanguageProtocolView::get_iter_at_line_pos(int line, int pos) {
line=std::min(line, get_buffer()->get_line_count()-1);
if(line<0)
line=0;
auto iter=get_iter_at_line_end(line);
pos=std::min(pos, iter.get_line_offset());
if(pos<0)
pos=0;
return get_buffer()->get_iter_at_line_offset(line, pos);
return get_iter_at_line_offset(line, pos);
}
void Source::LanguageProtocolView::show_type_tooltips(const Gdk::Rectangle &rectangle) {

2
src/source_language_protocol.h

@ -111,8 +111,6 @@ namespace Source {
void escape_text(std::string &text);
void unescape_text(std::string &text);
std::set<int> diagnostic_offsets;
Glib::RefPtr<Gtk::TextTag> similar_symbol_tag;
sigc::connection delayed_tag_similar_symbols_connection;
void tag_similar_symbols();

Loading…
Cancel
Save