mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-05-23 12:41:29 +02:00
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.
This commit is contained in:
parent
b513ca21c8
commit
246b7c7505
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2023-01-11 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 51295: Src/Zle/zle_utils.c: where the end of a region coincides
|
||||
with the end of PREDISPLAY, don't extend it to include new text
|
||||
|
||||
2023-01-10 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 51292: Src/Zle/zle_utils.c: fix dynamic updates of
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue