summaryrefslogtreecommitdiffstats
path: root/cmd-show-buffer.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-12-03 22:50:09 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-12-03 22:50:09 +0000
commit15a64b805e46584d37cc6745383709632e287999 (patch)
tree5a55f5006585c9cdde05163251fd99da243575b5 /cmd-show-buffer.c
parent6c9862662fd2cccdc55be9d447a27b10f33ed8ea (diff)
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying colours...
Diffstat (limited to 'cmd-show-buffer.c')
-rw-r--r--cmd-show-buffer.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd-show-buffer.c b/cmd-show-buffer.c
index d4484f08..b8c3c05d 100644
--- a/cmd-show-buffer.c
+++ b/cmd-show-buffer.c
@@ -73,24 +73,24 @@ cmd_show_buffer_exec(struct cmd *self, struct cmd_ctx *ctx)
width = s->sx;
if (ctx->cmdclient != NULL)
width = ctx->cmdclient->tty.sx;
-
+
buf = xmalloc(width + 1);
len = 0;
-
+
ptr = in;
do {
buf[len++] = *ptr++;
-
+
if (len == width || buf[len - 1] == '\n') {
if (buf[len - 1] == '\n')
len--;
buf[len] = '\0';
- ctx->print(ctx, "%s", buf);
+ ctx->print(ctx, "%s", buf);
len = 0;
}
} while (*ptr != '\0');
-
+
if (len != 0) {
buf[len] = '\0';
ctx->print(ctx, "%s", buf);