about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2023-01-10 21:17:24 +0100
committerOliver Kiddle <opk@zsh.org>2023-01-10 21:17:24 +0100
commitb513ca21c8aff35c76bb9b1cb30a9644e936833a (patch)
tree46b0212b0e6835219286c5fc4ef39c9610113335 /Src
parentbe2c91bbc3361398a18ea4b77d493dded0a60e79 (diff)
downloadzsh-b513ca21c8aff35c76bb9b1cb30a9644e936833a.tar.gz
zsh-b513ca21c8aff35c76bb9b1cb30a9644e936833a.tar.xz
zsh-b513ca21c8aff35c76bb9b1cb30a9644e936833a.zip
51292: fix dynamic updates of region_highlight to account for PREDISPLAY
Diffstat (limited to 'Src')
-rw-r--r--Src/Zle/zle_utils.c8
1 files changed, 4 insertions, 4 deletions
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;
 		}
 	    }
 	}