diff options
author | Oliver Kiddle <opk@zsh.org> | 2023-01-10 21:17:24 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2023-01-10 21:17:24 +0100 |
commit | b513ca21c8aff35c76bb9b1cb30a9644e936833a (patch) | |
tree | 46b0212b0e6835219286c5fc4ef39c9610113335 | |
parent | be2c91bbc3361398a18ea4b77d493dded0a60e79 (diff) | |
download | zsh-b513ca21c8aff35c76bb9b1cb30a9644e936833a.tar.gz zsh-b513ca21c8aff35c76bb9b1cb30a9644e936833a.tar.xz zsh-b513ca21c8aff35c76bb9b1cb30a9644e936833a.zip |
51292: fix dynamic updates of region_highlight to account for PREDISPLAY
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/Zle/zle_utils.c | 8 |
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; } } } |