Skip to content

Fix console selection after new log lines and scrolling#12416

Open
0xpixty wants to merge 1 commit into
ddnet:masterfrom
0xpixty:fix/console-content-anchored-selection-11140
Open

Fix console selection after new log lines and scrolling#12416
0xpixty wants to merge 1 commit into
ddnet:masterfrom
0xpixty:fix/console-content-anchored-selection-11140

Conversation

@0xpixty

@0xpixty 0xpixty commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Closes #11140.

Console selection previously persisted screen-space mouse coordinates after releasing the mouse. This made a completed selection unstable when backlog lines were appended, the console was scrolled, or the layout changed.

Selection endpoints now use stable backlog-entry IDs and glyph offsets. Rendering and clipboard extraction resolve the selected content from these anchors, so a completed selection remains attached to the same text across appends, scrolling, and layout changes.

Also addresses the related selection instability described in #12265.

Checklist

  • Tested the change ingame
  • Provided screenshots if it is a visual change
  • Tested in combination with possibly related configuration options
  • Written a unit test (especially base/) or added coverage to integration test
  • Considered possible null pointers and out of bounds array indexing
  • Changed no physics that affect existing maps
  • Tested the change with ASan+UBSan or Valgrind's memcheck (optional)
  • I didn't use generative AI to generate more than single-line completions

AI assistance: AI was used to explore the existing console selection implementation and draft parts of the change. I reviewed the design and diff, built the client, ran the test suite, and manually tested the behavior in-game.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Console text selection breaks when selecting input text while new message appears in log

1 participant