[PR #1056] [CLOSED] fix(tui): remove extra newline after exiting /editor #9797

Closed
opened 2026-02-16 18:14:11 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/1056
Author: @AdiY00
Created: 7/16/2025
Status: Closed

Base: devHead: fix/truncate-extra-newline


📝 Commits (1)

  • 243b262 fix: remove extra newline after exiting editor

📊 Changes

2 files changed (+1 additions, -1 deletions)

View changed files

packages/tui/cmd/opencode/opencode (+0 -0)
📝 packages/tui/internal/components/chat/editor.go (+1 -1)

📄 Description

Basically, whenever you exit the editor after making a change it would add an extra newline because of some weird read file interaction.
Fixed that by truncating one "\n" in the SetValue function.

(also deleted an extra binary that accidentally got included in my last commit)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/1056 **Author:** [@AdiY00](https://github.com/AdiY00) **Created:** 7/16/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/truncate-extra-newline` --- ### 📝 Commits (1) - [`243b262`](https://github.com/anomalyco/opencode/commit/243b262f65c25ee0ecf78ce4bd1c40ee7d8e86af) fix: remove extra newline after exiting editor ### 📊 Changes **2 files changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> ➖ `packages/tui/cmd/opencode/opencode` (+0 -0) 📝 `packages/tui/internal/components/chat/editor.go` (+1 -1) </details> ### 📄 Description Basically, whenever you exit the editor after making a change it would add an extra newline because of some weird read file interaction. Fixed that by truncating one `"\n"` in the `SetValue` function. (also deleted an extra binary that accidentally got included in my last commit) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:11 -05:00
yindo closed this issue 2026-02-16 18:14:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9797