Skip to content

First new-line being removed on submit #41108

Description

@c17r

Description

I use lists -- ordered and unordered -- quite a bit in my messages and I noticed the first new-line tends to get removed when my message is displayed in the session.

Before pressing return

Image

What shows up in the session

Image

Happens even when clicking the "send" button in the UI. Happens with shorter lines as well

Image

Further testing, it seems to be when I type my message in a separate editor (which I do because I jump operating systems enough that I forget which one requires shift-return vs ctrl-return vs etc to get a new-line in the input control). If I do use e.g. shift-return on windows to insert the new-line, things are then formatted correctly

Image

Further further testing, it's anything with copy/pasted with new-lines. It's just easier to notice with a list

Image

becomes

Image

Plugins

No response

OpenCode version

1.18.15

Steps to reproduce

  1. create an ordered/unordered markdown list in a separate editor
  2. copy/paste the whole thing into the opencode input control
  3. either hit return to click "send"

Screenshot and/or share link

No response

Operating System

Ubuntu 26.04 WLS (opencode) and Windows 11 (chrome)

Terminal

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions