diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2017-05-03 17:51:52 +0200 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2017-05-03 17:51:52 +0200 |
| commit | 3c6a6c4c342e2b5cca62cda849acc6d476dafa30 (patch) | |
| tree | 029880665f1436e4a6e325e1c4761d04b7c8127c /vis-operators.c | |
| parent | 1c8990a329fabf3cf4ab790a61ee86c35391c042 (diff) | |
| download | vis-3c6a6c4c342e2b5cca62cda849acc6d476dafa30.tar.gz vis-3c6a6c4c342e2b5cca62cda849acc6d476dafa30.tar.xz | |
text: remove text_insert_newline function
This is no longer needed because we always insert \n never \r\n.
Diffstat (limited to 'vis-operators.c')
| -rw-r--r-- | vis-operators.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vis-operators.c b/vis-operators.c index 38ac7c8..bce91ad 100644 --- a/vis-operators.c +++ b/vis-operators.c @@ -64,11 +64,11 @@ static size_t op_put(Vis *vis, Text *txt, OperatorContext *c) { for (int i = 0; i < c->count; i++) { char nl; if (c->reg->linewise && pos > 0 && text_byte_get(txt, pos-1, &nl) && nl != '\n') - pos += text_insert_newline(txt, pos); + pos += text_insert(txt, pos, "\n", 1); text_insert(txt, pos, data, len); pos += len; if (c->reg->linewise && pos > 0 && text_byte_get(txt, pos-1, &nl) && nl != '\n') - pos += text_insert_newline(txt, pos); + pos += text_insert(txt, pos, "\n", 1); } if (c->reg->linewise) { |
