summaryrefslogtreecommitdiff
path: root/src/dged
diff options
context:
space:
mode:
Diffstat (limited to 'src/dged')
-rw-r--r--src/dged/buffer.c6
-rw-r--r--src/dged/buffer_view.c4
-rw-r--r--src/dged/text.h2
3 files changed, 7 insertions, 5 deletions
diff --git a/src/dged/buffer.c b/src/dged/buffer.c
index 9eab505..0fac694 100644
--- a/src/dged/buffer.c
+++ b/src/dged/buffer.c
@@ -61,7 +61,9 @@ static struct kill_ring {
uint64_t found_at = -1; \
VEC_FOR_EACH_INDEXED(hooks, struct name##_hook *h, idx) { \
if (h->id == id) { \
- callback(h->userdata); \
+ if (callback != NULL) { \
+ callback(h->userdata); \
+ } \
found_at = idx; \
break; \
} \
@@ -1073,6 +1075,8 @@ static void apply_properties(struct command_list *cmds,
}
break;
}
+ case TextProperty_Data:
+ break;
}
}
}
diff --git a/src/dged/buffer_view.c b/src/dged/buffer_view.c
index 2d0b6b8..4e67d78 100644
--- a/src/dged/buffer_view.c
+++ b/src/dged/buffer_view.c
@@ -479,8 +479,4 @@ void buffer_view_update(struct buffer_view *view,
// draw buffer commands nested inside this command list
command_list_draw_command_list(params->commands, buf_cmds);
timer_stop(render_buffer_timer);
-
- // TODO: move to somewhere where more correct if buffers
- // are in more than one view (same with buffer hooks).
- buffer_clear_text_properties(view->buffer);
}
diff --git a/src/dged/text.h b/src/dged/text.h
index 922014e..8b49ef4 100644
--- a/src/dged/text.h
+++ b/src/dged/text.h
@@ -59,6 +59,7 @@ bool text_line_contains_unicode(struct text *text, uint32_t line);
enum text_property_type {
TextProperty_Colors,
+ TextProperty_Data,
};
struct text_property_colors {
@@ -72,6 +73,7 @@ struct text_property {
enum text_property_type type;
union {
struct text_property_colors colors;
+ void *userdata;
};
};