Skip to content

Crash on terminal resize with CJK (wide) characters in the prompt #13040

Description

@Im-Tae

Pre-submit Checks

Describe the bug

Warp crashes (the whole app quits) when the terminal contains wide (full-width, cell-width 2) characters — e.g. a directory named in Korean (한글) shown in the shell prompt — and the terminal grid is resized (window/pane layout change, or prompt redraw while typing).

The crash is a Rust panic that aborts the process (SIGABRT / abort() called). From the macOS crash report, the panicking frame is:

warp::terminal::model::grid::resize::InitialCursorState::into_content_offset
  → core::result::unwrap_failed   (.expect("should have a content offset for point"))

Call chain:
TerminalView::resize_internalTerminalModel::resizeBlockList::resizeGridHandler::resizeresize_storageInitialCursorState::into_content_offsetpanic

Root cause (preliminary): the cursor point computed against the live grid in InitialCursorState::new does not map to a valid content offset in flat_storage when the row contains wide characters; content_offset_at_point(point) returns Err (column exceeds content / wide-char spacer case) and the .expect() aborts instead of degrading gracefully. The content_offset_at_point doc comment itself lists WIDE_CHAR_SPACER / LEADING_WIDE_CHAR_SPACER cells as untested cases.

To reproduce

  1. Create a directory with a Korean name, e.g. mkdir 한글폴더
  2. cd 한글폴더 so the prompt shows the wide characters
  3. Use the terminal / type a command / resize the window or split a pane (anything that triggers a grid resize)
  4. Warp crashes and quits

(Only Korean was tested; any wide/CJK character is expected to trigger it.)

Expected behavior

The terminal handles wide characters during resize without crashing; the cursor is placed at a reasonable position.

Screenshots, videos, and logs

macOS crash report attached (EXC_CRASH / SIGABRT, abort() called). Key frame:
warp::terminal::model::grid::resize::InitialCursorState::into_content_offset + unwrap_failed.

Operating system (OS)

macOS

Operating system and version

macOS 26.4 (25E246) — Apple M4 Pro (Mac16,8)

Shell Version

No response

Current Warp version

0.2026.06.17.09.49.02 (stable)

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this an issue only in Warp?

Yes, I confirmed that this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:shell-terminalTerminal input/output, shell integration, prompt behavior, and block rendering.area:window-tabs-panesWindow, tab, pane, and workspace layout management.bugSomething isn't working.duplicateThis issue or pull request already exists.os:macmacOS-specific behavior, regressions, or requests.repro:highThe report includes enough evidence that the issue appears highly reproducible.triagedIssue has received an initial automated triage pass.warp:auto-triage-review

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions