aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vis.c b/vis.c
index 4a38903..bc488f6 100644
--- a/vis.c
+++ b/vis.c
@@ -1596,7 +1596,7 @@ size_t vis_text_insert_nl(Vis *vis, Text *txt, size_t pos) {
text_insert(txt, pos, "\n", 1);
if (eof) {
if (nl2)
- text_insert(txt, pos, "\n", 1);
+ text_insert(txt, text_size(txt), "\n", 1);
else
pos--; /* place cursor before, not after nl */
}