mirror of
https://github.com/sst/opencode.git
synced 2025-07-24 08:15:04 +00:00
trimmed selection ui
This commit is contained in:
parent
93446df335
commit
758425a8e4
1 changed files with 3 additions and 3 deletions
|
@ -511,9 +511,9 @@ func (m *messagesComponent) renderView() tea.Cmd {
|
|||
}
|
||||
|
||||
prefix := ansi.Cut(line, 0, left)
|
||||
middle := ansi.Strip(ansi.Cut(line, left, right))
|
||||
suffix := ansi.Cut(line, right, width)
|
||||
clipboard = append(clipboard, strings.TrimRight(middle, " "))
|
||||
middle := strings.TrimRight(ansi.Strip(ansi.Cut(line, left, right)), " ")
|
||||
suffix := ansi.Cut(line, left+len(middle), width)
|
||||
clipboard = append(clipboard, middle)
|
||||
line = prefix + styles.NewStyle().Background(t.Accent()).Foreground(t.BackgroundPanel()).Render(ansi.Strip(middle)) + suffix
|
||||
}
|
||||
final = append(final, line)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue