aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2017-06-07 17:12:27 +0200
committerThomas White <taw@bitwiz.org.uk>2017-06-07 17:12:27 +0200
commit3ad136280729cad7e1446bd99ad5b057f6470b57 (patch)
treefffa1296f2ce5c7348576c32657f02026f144eb4 /src
parent070fa883eb71bcec62d3434eee9a7bbe40bb6e25 (diff)
Update paragraph indices when deleting
Diffstat (limited to 'src')
-rw-r--r--src/frame.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index cdac937..3c9dd34 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -969,6 +969,8 @@ void delete_text_from_frame(struct frame *fr, struct edit_pos p1, struct edit_po
if ( (start == 0) && (finis == -1) ) {
delete_paragraph(fr, i);
+ p2.para--;
+ i--;
} else {
delete_text_in_paragraph(para, start, finis);
wrap_paragraph(para, NULL, wrapw, 0, 0);