diff --git a/src/config/block.go b/src/config/block.go index e296069c..0cf4f861 100644 --- a/src/config/block.go +++ b/src/config/block.go @@ -34,19 +34,17 @@ const ( // Block defines a part of the prompt with optional segments type Block struct { - env runtime.Environment - Type BlockType `json:"type,omitempty" toml:"type,omitempty"` - Alignment BlockAlignment `json:"alignment,omitempty" toml:"alignment,omitempty"` - Filler string `json:"filler,omitempty" toml:"filler,omitempty"` - Overflow Overflow `json:"overflow,omitempty" toml:"overflow,omitempty"` - LeadingDiamond string `json:"leading_diamond,omitempty" toml:"leading_diamond,omitempty"` - TrailingDiamond string `json:"trailing_diamond,omitempty" toml:"trailing_diamond,omitempty"` - Segments []*Segment `json:"segments,omitempty" toml:"segments,omitempty"` - VerticalOffset int `json:"vertical_offset,omitempty" toml:"vertical_offset,omitempty"` - HorizontalOffset int `json:"horizontal_offset,omitempty" toml:"horizontal_offset,omitempty"` - MaxWidth int `json:"max_width,omitempty" toml:"max_width,omitempty"` - MinWidth int `json:"min_width,omitempty" toml:"min_width,omitempty"` - Newline bool `json:"newline,omitempty" toml:"newline,omitempty"` + env runtime.Environment + Type BlockType `json:"type,omitempty" toml:"type,omitempty"` + Alignment BlockAlignment `json:"alignment,omitempty" toml:"alignment,omitempty"` + Filler string `json:"filler,omitempty" toml:"filler,omitempty"` + Overflow Overflow `json:"overflow,omitempty" toml:"overflow,omitempty"` + LeadingDiamond string `json:"leading_diamond,omitempty" toml:"leading_diamond,omitempty"` + TrailingDiamond string `json:"trailing_diamond,omitempty" toml:"trailing_diamond,omitempty"` + Segments []*Segment `json:"segments,omitempty" toml:"segments,omitempty"` + MaxWidth int `json:"max_width,omitempty" toml:"max_width,omitempty"` + MinWidth int `json:"min_width,omitempty" toml:"min_width,omitempty"` + Newline bool `json:"newline,omitempty" toml:"newline,omitempty"` } func (b *Block) Init(env runtime.Environment) { diff --git a/src/prompt/engine.go b/src/prompt/engine.go index 29685692..195fd635 100644 --- a/src/prompt/engine.go +++ b/src/prompt/engine.go @@ -205,10 +205,6 @@ func (e *Engine) renderBlock(block *config.Block, cancelNewline bool) bool { switch block.Type { //nolint:exhaustive case config.Prompt: - if block.VerticalOffset != 0 { - e.write(terminal.ChangeLine(block.VerticalOffset)) - } - if block.Alignment == config.Left { e.currentLineLength += length e.write(text)