Skip to content

Find/Replace, Format, multi-cursor, Go and Tools menus - #14

Merged
Tuafo merged 3 commits into
mainfrom
claude/cool-hypatia-ict23g
Oct 14, 2026
Merged

Tuafo merged 3 commits into
mainfrom
claude/cool-hypatia-ict23g

Conversation

@Tuafo

@Tuafo Tuafo commented Oct 14, 2026

Copy link
Copy Markdown
Member

The rest of Far-Beyond-Pulsar/Pulsar-Native#1012 for the script editor: the commands that left the global menu bar are now in the editor's own menus, with their keys.

Menus

  • Edit:
    • Find: opens a find bar above the text. It has a Match Case toggle, a "3 of 12" count, and Previous/Next buttons. Enter goes to the next match and Shift+Enter to the previous one.
    • Replace: adds a replace field. Replace and Replace All are each one undo step.
    • Find Next / Find Previous.
    • Format Document: uses rust-analyzer's textDocument/formatting. If the text changes while the server is answering, the answer is dropped.
  • Selection: Add Cursor Above / Below.
  • Go:
    • Go to Line…: accepts line or line:column.
    • Go to Symbol in File… and Go to References: show a filterable list under the bar. Enter opens the first item, and clicking an item opens that place, including in other files.
    • Go to Definition and Go to Parent Module.
  • Tools (Rust):
    • Expand Macro: opens the recursive expansion as a scratch .rs file.
    • Open Cargo.toml and Reload Cargo Workspace.
    • Generate 1M-Line Stress File: the generator that was only on the toolbar.

The context menu also gets Go to Definition, Go to References and Format Document.

Keys: Ctrl+F, Ctrl+H, F3, Shift+F3, Ctrl+G, F12, Shift+F12, Ctrl+Shift+O and Shift+Alt+F. Escape closes the bar. The bindings are in the panel's key context, so they run before the text view handles the key.

Without a language server: the Go lists say why there is nothing to show, and the LSP items do nothing.

Dependencies

Tests

  • workspace_panels::tests::find_go_to_line_and_add_cursor_through_the_panel drives a real panel through its keys:
    • Ctrl+F, typing, Enter and Shift+F3 step through the matches; Escape closes the bar and clears the highlights.
    • Ctrl+G and 2:4 move the caret.
    • Add Cursor Above adds a caret.
    • Ctrl+Shift+O with no language server reports why the list is empty.
  • Parser tests cover:
    • references (Location[]);
    • document symbols, both nested DocumentSymbol[] and flat SymbolInformation[];
    • macro expansions;
    • line:column input.
  • cargo check --tests passes against Pulsar-Native.
  • The full test run is left to this repo's CI. Building it locally needs a complete rebuild that does not fit on the build machine's disk.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RXesb588JFPYCDBnK94vn5


Generated by Claude Code

…#1012)

The script editor's menus get the commands that left the global menu bar:

- Edit: Find, Replace, Find Next/Previous (a find bar above the text with
  match case, a match count, Replace and Replace All, each one undo step)
  and Format Document (textDocument/formatting, dropped if the text changed
  while the server answered).
- Selection: Add Cursor Above/Below.
- Go: Go to Line (line or line:column), Go to Symbol in File and Go to
  References (a filterable list under the find bar; Enter opens the first),
  Go to Definition, Go to Parent Module.
- Tools (rust-analyzer): Expand Macro (opens the expansion as a scratch
  file), Open Cargo.toml, Reload Cargo Workspace, and the 1M-line stress
  file generator.

Keys: Ctrl+F, Ctrl+H, F3/Shift+F3, Ctrl+G, F12, Shift+F12, Ctrl+Shift+O,
Shift+Alt+F; Escape closes the bar. Mockaco is bumped to the revision with
the view API these use.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RXesb588JFPYCDBnK94vn5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RXesb588JFPYCDBnK94vn5
…put does

The find/go-to-line test failed on CI and, once past that, corrupted the
heap. Three differences from the editor caused it, none in the panel:

- The window's root was the panel; text inputs paint through ui::Root
  (Root::update assumes the root is one), so painting the find field wrote
  past the panel. The test now roots the window in ui::Root, as the editor
  does (valgrind: 0 errors).
- Nothing held the TextEditor, which the panel only refers to weakly, so
  Go to Symbol had no editor to ask. The test holds it, as the script
  editor does.
- The test platform delivers a typed character to an input twice (key down
  and simulated IME) and turns Enter into a newline; desktop platforms do
  neither. The bars' fields are filled and their Enter raised directly;
  the shortcuts still go through the keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RXesb588JFPYCDBnK94vn5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pending Release

Development

Successfully merging this pull request may close these issues.

2 participants