summary refs log tree commit diff stats
path: root/widgets
diff options
context:
space:
mode:
authorGalen Abell <galen@galenabell.com>2019-07-27 10:38:51 -0400
committerDrew DeVault <sir@cmpwn.com>2019-07-27 12:37:54 -0400
commita669233614d3b4134baabd3325cb64e8f0f2cdeb (patch)
tree5efe39082f846c9810f4092c80732d84471c07fc /widgets
parentd931bbeff149d603c3210db23aea50dbd3d88d57 (diff)
downloadaerc-a669233614d3b4134baabd3325cb64e8f0f2cdeb.tar.gz
Fix review message not filling entire space
Adding an attachment, switching to a different tab, and switching back
to the review message caused the "filled space" in the review message to
disappear, since there was one too many rows in the layout.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/compose.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 4f6f7a1..6a41e70 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -553,7 +553,7 @@ type reviewMessage struct {
 
 func newReviewMessage(composer *Composer, err error) *reviewMessage {
 	spec := []ui.GridSpec{{ui.SIZE_EXACT, 2}, {ui.SIZE_EXACT, 1}}
-	for range composer.attachments {
+	for i := 0; i < len(composer.attachments)-1; i++ {
 		spec = append(spec, ui.GridSpec{ui.SIZE_EXACT, 1})
 	}
 	// make the last element fill remaining space