summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/Zle/zle_utils.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index e1d81845b..ddee8700e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2023-01-10 Oliver Kiddle <opk@zsh.org>
+ * 51292: Src/Zle/zle_utils.c: fix dynamic updates of
+ region_highlight to account for PREDISPLAY
+
* 51291: Doc/Zsh/zle.yo, Src/Zle/zle_refresh.c, Src/prompt.c:
support for highlighting ellipses in the line editor
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c
index 1a580a9e6..45a82dd5e 100644
--- a/Src/Zle/zle_utils.c
+++ b/Src/Zle/zle_utils.c
@@ -866,13 +866,13 @@ shiftchars(int to, int cnt)
if (rhp->start_meta - sub > to + cnt)
rhp->start_meta -= cnt;
else
- rhp->start_meta = to;
+ rhp->start_meta = to + sub;
}
if (rhp->end_meta - sub > to) {
if (rhp->end_meta - sub > to + cnt)
rhp->end_meta -= cnt;
else
- rhp->end_meta = to;
+ rhp->end_meta = to + sub;
}
}
}
@@ -896,13 +896,13 @@ shiftchars(int to, int cnt)
if (rhp->start - sub > to + cnt)
rhp->start -= cnt;
else
- rhp->start = to;
+ rhp->start = to + sub;
}
if (rhp->end - sub > to) {
if (rhp->end - sub > to + cnt)
rhp->end -= cnt;
else
- rhp->end = to;
+ rhp->end = to + sub;
}
}
}