From: NeilBrown Date: Thu, 26 Nov 2015 01:32:19 +0000 (+1100) Subject: Use "Notify:Replace" for notifications. X-Git-Tag: lca2016~214 X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=a1e7e07399c74646af9f9392621e519a7cf050a3;p=edlib.git Use "Notify:Replace" for notifications. We currently use "Notify" both to make changes and to notify of changes. This can be confusion - they are different tasks needing different names. Signed-off-by: NeilBrown --- diff --git a/core-mark.c b/core-mark.c index be7a76b4..621dc217 100644 --- a/core-mark.c +++ b/core-mark.c @@ -876,7 +876,7 @@ void point_notify_change(struct point *p, struct mark *m) struct doc *d = p->doc; int i; - ci.key = "Replace"; + ci.key = "Notify:Replace"; ci.numeric = 1; ci.x = ci.y = -1; ci.pointp = p->owner; @@ -941,7 +941,7 @@ void doc_notify_change(struct doc *d, struct mark *m) done = alloca(d->nviews); for (i = 0; i < d->nviews; i++) done[i] = 0; - ci.key = "Replace"; + ci.key = "Notify:Replace"; ci.numeric = 1; ci.x = ci.y = -1; while (remaining) { diff --git a/lib-line-count.c b/lib-line-count.c index 341de4b2..a403624a 100644 --- a/lib-line-count.c +++ b/lib-line-count.c @@ -81,7 +81,7 @@ static void do_count(struct doc *d, struct mark *start, struct mark *end, DEF_CMD(count_notify) { - if (strcmp(ci->key, "Replace") == 0) { + if (strcmp(ci->key, "Notify:Replace") == 0) { if (ci->mark != NULL) { attr_del(mark_attr(ci->mark), "lines"); attr_del(mark_attr(ci->mark), "words"); diff --git a/lib-view.c b/lib-view.c index 89e56a40..cfe9ceba 100644 --- a/lib-view.c +++ b/lib-view.c @@ -191,7 +191,7 @@ DEF_CMD(view_notify) { struct view_data *vd = container_of(ci->comm, struct view_data, ch_notify); - if (strcmp(ci->key, "Replace") == 0) { + if (strcmp(ci->key, "Notify:Replace") == 0) { pane_damaged(vd->pane, DAMAGED_CONTENT); return 0; } diff --git a/render-dir.c b/render-dir.c index b3709444..d3e59e48 100644 --- a/render-dir.c +++ b/render-dir.c @@ -302,7 +302,7 @@ DEF_CMD(render_dir_notify) { struct dir_data *dd = container_of(ci->comm, struct dir_data, type); - if (strcmp(ci->key, "Replace") == 0) { + if (strcmp(ci->key, "Notify:Replace") == 0) { if (ci->mark == dd->top) /* A change in the text between top and bot */ pane_damaged(dd->pane, DAMAGED_CONTENT); diff --git a/render-hex.c b/render-hex.c index 43d3077d..8d8485b7 100644 --- a/render-hex.c +++ b/render-hex.c @@ -65,7 +65,7 @@ DEF_CMD(render_hex_notify) { struct he_data *he = container_of(ci->comm, struct he_data, type); - if (strcmp(ci->key, "Replace") == 0) { + if (strcmp(ci->key, "Notify:Replace") == 0) { pane_damaged(pane_child(he->pane), DAMAGED_CONTENT); return 0; } diff --git a/render-lines.c b/render-lines.c index e2ef9295..0e6cf849 100644 --- a/render-lines.c +++ b/render-lines.c @@ -857,7 +857,7 @@ DEF_CMD(render_lines_notify) { struct rl_data *rl = container_of(ci->comm, struct rl_data, type); - if (strcmp(ci->key, "Replace") == 0) { + if (strcmp(ci->key, "Notify:Replace") == 0) { if (ci->mark) { struct rl_mark *rm = container_of(ci->mark, struct rl_mark, m); diff --git a/render-text.c b/render-text.c index 3b0b4d1f..0e0bfd5f 100644 --- a/render-text.c +++ b/render-text.c @@ -327,7 +327,7 @@ DEF_CMD(render_text_notify) { struct rt_data *rt = container_of(ci->comm, struct rt_data, type); - if (strcmp(ci->key, "Replace") == 0) { + if (strcmp(ci->key, "Notify:Replace") == 0) { if (ci->mark == rt->top) /* A change in the text between top and bot */ pane_damaged(rt->pane, DAMAGED_CONTENT);