mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-03-05 20:49:04 -08:00
fix(prompt): reset colors before printing fillers
This commit is contained in:
parent
6402d5d488
commit
1adf542a77
|
@ -154,6 +154,7 @@ func (e *Engine) shouldFill(filler string, padLength int) (string, bool) {
|
|||
}
|
||||
|
||||
// allow for easy color overrides and templates
|
||||
terminal.SetColors("default", "default")
|
||||
terminal.Write("", "", filler)
|
||||
filler, lenFiller := terminal.String()
|
||||
if lenFiller == 0 {
|
||||
|
|
|
@ -147,6 +147,11 @@
|
|||
"description": "The duration for which the segment will be cached. This is parsed using the `time.ParseDuration` function from the Go standard library (see https://pkg.go.dev/time#ParseDuration for details).",
|
||||
"pattern": "^(infinite|([0-9]+(h|m|s))+)$"
|
||||
},
|
||||
"filler": {
|
||||
"type": "string",
|
||||
"title": "Filler",
|
||||
"description": "Right aligned filler text, will span the remaining width."
|
||||
},
|
||||
"extra_prompt": {
|
||||
"type": "object",
|
||||
"default": {},
|
||||
|
@ -230,6 +235,10 @@
|
|||
"hide"
|
||||
],
|
||||
"default": ""
|
||||
},
|
||||
"filler": {
|
||||
"$ref": "#/definitions/filler",
|
||||
"description": "https://ohmyposh.dev/docs/configuration/block#filler"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4787,19 +4796,21 @@
|
|||
"$ref": "#/definitions/extra_prompt",
|
||||
"title": "Transient Prompt Setting",
|
||||
"description": "https://ohmyposh.dev/docs/configuration/transient",
|
||||
"properties": {
|
||||
"filler": {
|
||||
"type": "string",
|
||||
"title": "Filler",
|
||||
"description": "Right aligned filler text, will span the remaining width"
|
||||
},
|
||||
"newline": {
|
||||
"type": "boolean",
|
||||
"title": "Newline",
|
||||
"description": "Add a newline before the prompt",
|
||||
"default": false
|
||||
"anyOf": [
|
||||
{
|
||||
"properties": {
|
||||
"filler": {
|
||||
"$ref": "#/definitions/filler"
|
||||
},
|
||||
"newline": {
|
||||
"type": "boolean",
|
||||
"title": "Newline",
|
||||
"description": "Add a newline before the prompt",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"valid_line": {
|
||||
"$ref": "#/definitions/extra_prompt",
|
||||
|
|
Loading…
Reference in a new issue