package layout

import "github.com/elves/elvish/styled"

// ModePrompt returns a callback suitable as the prompt in the codearea of a
// combobox.
func ModePrompt(content string, space bool) func() styled.Text {
	p := styled.MakeText(content, "bold", "lightgray", "bg-magenta")
	if space {
		p = p.ConcatText(styled.Plain(" "))
	}
	return func() styled.Text { return p }
}

package layout

import "github.com/elves/elvish/styled"

// ModePrompt returns a styled text that is suitable as the prompt in the codearea
// of a combobox.
func ModePrompt(content string, space bool) func() styled.Text {
	p := styled.MakeText(content, "bold", "lightgray", "bg-magenta")
	if space {
		p = p.ConcatText(styled.Plain(" "))
	}
	return func() styled.Text { return p }
}

--- 
+++ 
@@ -2,8 +2,8 @@
 
 import "github.com/elves/elvish/styled"
 
-// ModePrompt returns a styled text that is suitable as the prompt in the codearea
-// of a combobox.
+// ModePrompt returns a callback suitable as the prompt in the codearea of a
+// combobox.
 func ModePrompt(content string, space bool) func() styled.Text {
 	p := styled.MakeText(content, "bold", "lightgray", "bg-magenta")
 	if space {
cli/layout: Make doc comment of ModeLine more accurate.
