8000 Tags · golimpio/dez · GitHub
[go: up one dir, main page]

Skip to content
  • Tags

    Tags

    nightly

    Toggle nightly's commit message

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    gpui: Normalize clipboard line endings on Windows (zed-industries#66945)
    
    Windows applications expect CRLF line endings in CF_UNICODETEXT, so
    convert LF to CRLF when writing to the clipboard. Convert CRLF back to
    LF when reading from the clipboard, too, to prevent surprises in
    applications.
    
    Release Notes:
    
    - N/A
    - [GPUI] N/A
    
    Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

    v1.30.1-pre

    Toggle v1.30.1-pre's commit message

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Bump to 1.30.1 for @JosephTLyons
    
    

    v1.30.0-pre

    Toggle v1.30.0-pre's commit message

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    v1.30.x preview for @JosephTLyons
    
    

    v1.29.2

    Toggle v1.29.2's commit message

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Bump to 1.29.2 for @JosephTLyons
    
    

    v1.29.1

    Toggle v1.29.1's commit message

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    v1.29.x stable for @JosephTLyons
    
    

    collab-staging

    Toggle collab-staging's commit message

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    markdown: Fix crash when a selection maps into the middle of a charac…
    
    …ter (zed-industries#67104)
    
    ## Summary
    
    Fixes a crash when the platform asks rendered Markdown for its selection
    (IME position updates on macOS and Wayland):
    
    ```
    end byte index 5 is not a char boundary; it is inside 'о' (bytes 4..6 of string)
    ```
    
    A Markdown selection is stored as source byte offsets.
    `RenderedLine::rendered_index_for_source_index` converted one to a
    rendered index by adding the source displacement to the rendered offset
    and clamping only to the text length, so the result could be inside a
    UTF-8 character. `RenderedText::text_for_range` then sliced there and
    panicked. Three ways to get such an offset:
    
    - The source changes after the selection was made and a clicked offset
    ends up inside syntax that is now hidden, such as a link destination
    that finished streaming in an agent message.
    - The source is replaced while the selection is kept, such as a tool
    call label whose title updates.
    - Rendered text is longer than its source. Smart punctuation turns a run
    of hyphens into en dashes, and a click late in the run produces a source
    offset past the end of the hyphens.
    
    Changes, all in `crates/markdown/src/markdown.rs`:
    
    - A source offset inside hidden syntax maps to the end of the rendered
    text before it instead of spilling into the following text.
    - An offset before a line's first text no longer underflows.
    - `text_for_range` and `surrounding_word_range` snap to a character
    boundary of the laid-out text before slicing.
    - Rendered text that is longer than its source, such as en dashes made
    from a run of hyphens, gets a source mapping per character. Before,
    clicking late in a run of en dashes selected the text after it; now
    double-clicking selects the dashes and a drag selects one dash at a
    time.
    
    Not covered here:
    
    - Source positions inside text the parser rewrites (dash runs, HTML
    entities, backslash escapes, code lines with an expanded tab) are
    estimates. The parser reports where a rewritten piece starts and ends in
    the source, but not which source bytes produced each rendered character.
    A run that mixes em and en dashes can be one hyphen off, for example.
    This affects Copy as Markdown of part of such text and where a click in
    Markdown Preview places the editor cursor; highlighting, selection and
    Copy are exact. Making these exact needs the parser to report a
    per-character correspondence.
    - A selection still survives `Markdown::replace` by byte offset, so it
    can highlight unrelated text afterwards.
    
    Closes FR-546
    
    ## Testing
    
    Manual reproduction on a build without this change:
    
    1. In the agent panel, start a thread and send the following. The line
    contains 40 hyphens.
    
       ```
    Reply with exactly this one line and nothing else, not in a code block:
       Итог ---------------------------------------- 回回回回回回
       ```
    
    The hyphens should render as a run of 20 short en dashes. If the reply
    has a hyphen count divisible by 3 they render as wider em dashes and the
    steps below do nothing, so ask again.
    2. Wait for the reply to finish.
    3. Double-click one of the last five dashes at the right end of the run.
    Zed crashes with `end byte index … is not a char boundary; it is inside
    '回'`.
    
    To get the stack from the crash reports instead, single-click one of
    those dashes and then click into an editor tab. The crash comes on the
    next frame through `Window::invalidate_character_coordinates` →
    `MarkdownInputHandler::selected_text_range`.
    
    With this change neither variant should crash, double-clicking any dash
    selects the whole run of dashes, and dragging across the run selects one
    dash at a time.
    
    Release Notes:
    
    - Fixed a crash when clicking or selecting text in agent messages and
    other rendered Markdown that contains non-ASCII characters

    v1.29.1-pre

    Toggle v1.29.1-pre's commit message

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Bump to 1.29.1 for @JosephTLyons
    
    

    v1.29.0-pre

    Toggle v1.29.0-pre's commit message

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    v1.29.x preview for @JosephTLyons
    
    

    v1.28.1

    Toggle v1.28.1's commit message

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Bump to 1.28.1 for @JosephTLyons
    
    

    v1.28.0

    Toggle v1.28.0's commit message

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    v1.28.x stable for @JosephTLyons
    
    
    0