1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-06-09 06:28:06 +02:00

51292: fix dynamic updates of region_highlight to account for PREDISPLAY

This commit is contained in:
Oliver Kiddle 2023-01-10 21:17:24 +01:00
parent be2c91bbc3
commit b513ca21c8
2 changed files with 7 additions and 4 deletions

View file

@ -1,5 +1,8 @@
2023-01-10 Oliver Kiddle <opk@zsh.org> 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: * 51291: Doc/Zsh/zle.yo, Src/Zle/zle_refresh.c, Src/prompt.c:
support for highlighting ellipses in the line editor support for highlighting ellipses in the line editor

View file

@ -866,13 +866,13 @@ shiftchars(int to, int cnt)
if (rhp->start_meta - sub > to + cnt) if (rhp->start_meta - sub > to + cnt)
rhp->start_meta -= cnt; rhp->start_meta -= cnt;
else else
rhp->start_meta = to; rhp->start_meta = to + sub;
} }
if (rhp->end_meta - sub > to) { if (rhp->end_meta - sub > to) {
if (rhp->end_meta - sub > to + cnt) if (rhp->end_meta - sub > to + cnt)
rhp->end_meta -= cnt; rhp->end_meta -= cnt;
else 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) if (rhp->start - sub > to + cnt)
rhp->start -= cnt; rhp->start -= cnt;
else else
rhp->start = to; rhp->start = to + sub;
} }
if (rhp->end - sub > to) { if (rhp->end - sub > to) {
if (rhp->end - sub > to + cnt) if (rhp->end - sub > to + cnt)
rhp->end -= cnt; rhp->end -= cnt;
else else
rhp->end = to; rhp->end = to + sub;
} }
} }
} }