diff options
author | Marvin Borner | 2021-04-22 21:26:39 +0200 |
---|---|---|
committer | Marvin Borner | 2021-04-22 21:26:39 +0200 |
commit | 3f745223b871390a92791f3c04fd703a5a66de38 (patch) | |
tree | fc591f25ad14a0855b61ecf2c3e321cf4f28429b /src/gui.c | |
parent | 825034a089901a58dd62b5a39f4c24761b6d5b4c (diff) |
Added unhighlighter
Diffstat (limited to 'src/gui.c')
-rw-r--r-- | src/gui.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -75,6 +75,15 @@ static void gui_init_highlighter(void) gtk_text_buffer_create_tag(buffer, "regs", "foreground", "#00ff00", NULL); } +void gui_unhighlight(void) +{ + GtkTextIter start, end; + GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text_view)); + + gtk_text_buffer_get_bounds(buffer, &start, &end); + gtk_text_buffer_remove_all_tags(buffer, &start, &end); +} + void gui_highlight(u32 column, u32 line, u32 length, const char *tag_name) { GtkTextIter start, end; |