Skip to content

fix: terminal content garbled after resize (split screen, floating window, rotation) #5154

Description

@Thatgfsj

手机分屏/小窗用 Termux,窗口一拉代码就成一坨了。滚动历史也丢了。

查下来是 resize 时列宽一变,直接把历史清了(mActiveTranscriptRows = 0),内容也是暴力拼接的,没考虑哪些行是自动换行哪些是硬回车。

修法:把自动换行的行合并成逻辑行,按新宽度重新切分。

  • 滚动历史不丢了
  • 光标位置准了
  • CJK/组合字符不乱
  • vim/nano/htop 不受影响

代码:github.com/Thatgfsj/termux-app/tree/feat/terminal-reflow

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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