aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-06-30 15:42:57 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-06-30 15:42:57 +0000
commitfd4904d82a5d601eaac896e425887a03192e0c44 (patch)
tree13ad98b3a614ef1f64ac01818e321ba82aba417c
parentMerge branch 'sixel-performance' (diff)
csi: debug: print 'private' *after* parameters
-rw-r--r--csi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/csi.c b/csi.c
index 37400953..62291aa9 100644
--- a/csi.c
+++ b/csi.c
@@ -35,12 +35,6 @@ csi_as_string(struct terminal *term, uint8_t final, int idx)
static char msg[1024];
int c = snprintf(msg, sizeof(msg), "CSI: ");
- for (size_t i = 0; i < sizeof(term->vt.private) / sizeof(term->vt.private[0]); i++) {
- if (term->vt.private[i] == 0)
- break;
- c += snprintf(&msg[c], sizeof(msg) - c, "%c", term->vt.private[i]);
- }
-
for (size_t i = idx >= 0 ? idx : 0;
i < (idx >= 0 ? idx + 1 : term->vt.params.idx);
i++)
@@ -57,6 +51,12 @@ csi_as_string(struct terminal *term, uint8_t final, int idx)
i == term->vt.params.idx - 1 ? "" : ";");
}
+ for (size_t i = 0; i < sizeof(term->vt.private) / sizeof(term->vt.private[0]); i++) {
+ if (term->vt.private[i] == 0)
+ break;
+ c += snprintf(&msg[c], sizeof(msg) - c, "%c", term->vt.private[i]);
+ }
+
snprintf(&msg[c], sizeof(msg) - c, "%c (%u parameters)",
final, idx >= 0 ? 1 : term->vt.params.idx);
return msg;