opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Terminal cursor blinks in opencode even though it shouldn't

Open sschwarzer opened this issue 5 months ago • 11 comments

Thanks a lot for Opencode, it's awesome! :-)

I have my terminal (Gnome Terminal 3.54.4) set to a non-blinking cursor because I find a blinking cursor quite distracting.

Since the release of Opencode 0.4.27 the non-blinking is no longer respected; the cursor blinks. In version 0.4.26 the cursor didn't blink, as configured in the terminal.

The cursor can be made non-blinking temporarily by resetting the terminal from its menu, but the blinking returns shortly after.

Maybe this was due to the change fix: use real cursor instead of virtual cursor?

sschwarzer avatar Aug 13 '25 18:08 sschwarzer

also have this issue

aashish2057 avatar Aug 13 '25 22:08 aashish2057

same issue and when I /exit the blinking persist on the current terminal tab/window

AlexSlayerLoop avatar Aug 13 '25 23:08 AlexSlayerLoop

I have the same behavior as @AlexSlayerLoop where the blinking persists after closing opencode

stordahl avatar Aug 14 '25 05:08 stordahl

We will look into this

rekram1-node avatar Aug 14 '25 14:08 rekram1-node

Had the same experience with ghostty

Mr-Robot-err-404 avatar Aug 19 '25 14:08 Mr-Robot-err-404

facing this problem using wezterm as well, on windows 11 24H2 build 26120.1843

seanmamasde avatar Sep 10 '25 01:09 seanmamasde

I imagine this will be fixed post opentui migration that should wrap up this week

rekram1-node avatar Sep 10 '25 02:09 rekram1-node

Still happening with opentui.

I have not been able to figure out why it's happening. I wonder if there is a random escape sequence hard-coded somewhere.

cwegener avatar Nov 03 '25 01:11 cwegener

Hmm .. I can't find a download for bun that has debug symbols enabled. Anybody know how to get symbols for bun in gdb?

cwegener avatar Nov 03 '25 04:11 cwegener

Ok. After a bit of reading and testing and looking at strace outputs, I think that the reason is because opentui doesn't support configurable cursor shapes for its edit/input buffers:

ug -r setCursorStyle packages/core/src/renderables
packages/core/src/renderables/EditBufferRenderable.ts
   420:     this._ctx.setCursorStyle("block", true)
   425:     this._ctx.setCursorStyle("block", true)

packages/core/src/renderables/Input.ts
   101:     this._ctx.setCursorStyle("block", true)

cwegener avatar Nov 03 '25 08:11 cwegener

Hi, Ever since https://github.com/anomalyco/opentui/pull/267 OpenTui has a cursorStyle configuration, is all that is left to do is to expose this configuration to opencode ? I'll love to disable cursor blinking!

pchampio avatar Jan 15 '26 09:01 pchampio