]> git.neil.brown.name Git - edlib.git/commitdiff
Use "Notify:Replace" for notifications.
authorNeilBrown <neil@brown.name>
Thu, 26 Nov 2015 01:32:19 +0000 (12:32 +1100)
committerNeilBrown <neil@brown.name>
Thu, 26 Nov 2015 01:33:50 +0000 (12:33 +1100)
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 <neil@brown.name>
core-mark.c
lib-line-count.c
lib-view.c
render-dir.c
render-hex.c
render-lines.c
render-text.c

index be7a76b416769ca4d1b7cd6526b521e5b8ea40fc..621dc2176d5027aa188ce3cd0b34e6665a1778aa 100644 (file)
@@ -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) {
index 341de4b2587ef5029a34b6e7c14c5b38378f4235..a403624a7bc1af9361a21852b1212e02b330a43c 100644 (file)
@@ -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");
index 89e56a4063619a7a27cabda4e307e0abe78efdd1..cfe9ceba092e733b91bf6bda9599ad11b44f434e 100644 (file)
@@ -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;
        }
index b3709444ffc3fceb903987a7c32837405e6d902f..d3e59e48a4e94dc1cba1e321d16d5cd4c6b37c4b 100644 (file)
@@ -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);
index 43d3077dc0a94ef6dc393ee3164af4f919fa3ca3..8d8485b71085282837c5e8b88da9f139551694bf 100644 (file)
@@ -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;
        }
index e2ef929584e7e44b713e06228543ba3ef23e53dc..0e6cf8498e1e32fc46e663eeccab5c5c2f16670a 100644 (file)
@@ -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);
index 3b0b4d1f96209b4ef2eb838f61fa1675488b83d4..0e0bfd5fb2e75a97752569b28cd554bc5f38da42 100644 (file)
@@ -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);