split: clamp minimum split size to 1
The split command allows delta size changes, which triggers a condition where the split can overflow into the dirlist. Clamp the minimum size of a split or vsplit to "1" to prevent the view from overflowing, or completely covering the message list. A split of 0 will still clear the split. Reported-by: Koni Marti <koni.marti@gmail.com> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
This commit is contained in:
parent
0cc56781dc
commit
edd48c9981
1 changed files with 4 additions and 0 deletions
|
@ -57,6 +57,10 @@ func (Split) Execute(aerc *widgets.Aerc, args []string) error {
|
||||||
// toggling the split
|
// toggling the split
|
||||||
n = 0
|
n = 0
|
||||||
}
|
}
|
||||||
|
if n < 0 {
|
||||||
|
// Don't allow split to go negative
|
||||||
|
n = 1
|
||||||
|
}
|
||||||
if args[0] == "split" {
|
if args[0] == "split" {
|
||||||
return acct.Split(n)
|
return acct.Split(n)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue