diff options
author | Oliver Kiddle <opk@zsh.org> | 2023-01-11 15:58:45 +0100 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2023-01-11 15:58:55 +0100 |
commit | 246b7c75055654dcc6186db1c4d52724dc522aa2 (patch) | |
tree | 7c2e084db795f7f02331dd1870c7b5070fb25f57 /Src | |
parent | b513ca21c8aff35c76bb9b1cb30a9644e936833a (diff) | |
download | zsh-246b7c75055654dcc6186db1c4d52724dc522aa2.tar.gz zsh-246b7c75055654dcc6186db1c4d52724dc522aa2.tar.xz zsh-246b7c75055654dcc6186db1c4d52724dc522aa2.zip |
51295: where the end of a region coincides with the end of PREDISPLAY, don't extend it to include new text
Also fix issue where an int was used for a copy of attributes which breaks if int is smaller than zattr.
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Src/Zle/zle_utils.c b/Src/Zle/zle_utils.c index 45a82dd5e..9ce91049c 100644 --- a/Src/Zle/zle_utils.c +++ b/Src/Zle/zle_utils.c @@ -580,7 +580,7 @@ struct zle_region; struct zle_region { struct zle_region *next; /* Entries of region_highlight, as needed */ - int atr; + zattr atr; int start; int end; int flags; @@ -799,7 +799,7 @@ spaceinline(int ct) if (rhp->start_meta - sub >= zlemetacs) { rhp->start_meta += ct; } - if (rhp->end_meta - sub >= zlemetacs) { + if (rhp->end_meta - sub >= zlemetacs && (!predisplaylen || zlecs)) { rhp->end_meta += ct; } } @@ -827,7 +827,7 @@ spaceinline(int ct) if (rhp->start - sub >= zlecs) { rhp->start += ct; } - if (rhp->end - sub >= zlecs) { + if (rhp->end - sub >= zlecs && (!predisplaylen || zlecs)) { rhp->end += ct; } } |