Skip to content

feat(macos): 添加编辑器按行号跳转对话框 - #348

Closed
Wz58luck wants to merge 15 commits into
1lck:mainfrom
Wz58luck:feat/editor-go-to-line
Closed

feat(macos): 添加编辑器按行号跳转对话框#348
Wz58luck wants to merge 15 commits into
1lck:mainfrom
Wz58luck:feat/editor-go-to-line

Conversation

@Wz58luck

@Wz58luckWz58luck commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Closes#341

概述

新增 "Go to Line:Column" 按行号跳转对话框——经典 IDE 风格的小型模态浮窗:单个 [Line] [:column]: 输入位,打开时预填当前光标的 1-based 位置并全选,附 Cancel / OK 按钮。

  • 三个鼠标可达入口(issue 明确要求):Navigate 菜单、编辑器右键菜单、状态栏的行:列指示(改为 plain 样式按钮,视觉保持不变)。无活动文档时禁用或为无操作。
  • Cmd+L 已注册进命令目录(go-to-line),可在 设置 → Keymap 中修改。
  • 输入:支持 120120:35,容忍空格;非法输入时 OK 按钮置灰,Return 不会跳转。越界行号收敛到最后一行,越界列号收敛到行尾(按 UTF-16 单元计),空文档只定位到文档开头。
  • 跳转行为:复用 navigateToEditorLocation——自动打开文档、进入导航历史(Cmd+[ 可回到跳转前的位置),并通过新增的 selectsWholeLine 标志整行选中目标行(默认 false,既有的符号/查找导航保持零长度光标不变)。
  • 主题:对话框应用与工作台窗口相同的 AppThemePreference 外观,在 system / light / dark 模式下都与编辑器保持一致。
  • 互斥:打开对话框会先关闭查找栏,反之亦然,逻辑收敛在 EditorChromeModel

测试

e7c63163-86ed-47a8-87b8-f22fdc1a41c6

1lckand others added 15 commits August 28, 2026 20:57
…tion
fix(macos): disable GitHub Pull Request integration
…ud-backend
refactor(windows): remove unused cloud backend features
- Add FindInFileOptions/FindInFileMatcher with Match Case, Whole Words,
and Regular Expression matching aligned with project search semantics
- Extend FindBarView with an options menu, expandable replace row
(Replace / Replace All), and invalid-regex error state
- Replace-next routes through insertText for standard undo; replace-all
commits via shouldChangeText + textStorage as a single undo step
- Register replace-in-file (Cmd+R) in the command catalog, action
registry, Navigate menu, Keymap settings, and zh-Hans localization
Closes1lck#327
Add three mouse-reachable entries for jumping to a line: the Navigate
menu, the editor context menu, and the status bar caret label, all
opening a shared go-to-line bar styled after the find bar. Input
accepts 1-based line or line:column, converges out-of-range values
against the live document, selects the target line through the
existing editorNavigationTarget pathway (now carrying
selectsWholeLine), and records navigation history so Cmd+[ returns
to the departure position. The bar and the find bar are mutually
exclusive; Cmd+L is registered in the command catalog and remappable
in Keymap settings.
Swap the in-editor go-to-line bar for a small modal "Go to Line:Column"
window: a single [Line] [:column]: input prefilled with the caret's
1-based position and fully selected, with Cancel/OK buttons. Return
and OK jump through the same parser and navigation pathway, invalid
input disables OK, and Esc, Cancel, or the close button dismiss
without side effects. Every entry point (Navigate menu, editor
context menu, status bar caret label, Cmd+L) funnels through the
chrome visibility flag via a shared presenter, so the workbench and
standalone editor windows both stay covered. Also unify all
go-to-line comments to English to match the surrounding files.
The dialog panel fell back to the system appearance and rendered light
inside a dark-themed editor. Apply the same AppThemePreference window
appearance the workbench windows use, so the dialog matches the editor
theme in system, light, and dark modes. Widen the private
AppThemePreference.windowAppearance helper for reuse.
@Wz58luck
Wz58luck requested a review from 1lck as a code ownerAugust 30, 2026 05:53
@Wz58luckWz58luck changed the title feat(macos): add editor go-to-line dialogfeat(macos): 添加编辑器按行号跳转对话框Aug 30, 2026
@xiaoyumuxi

Copy link
Copy Markdown
Collaborator

分支更新一下你这个改动太多了,拉最新的分支去改动

@xiaoyumuxi

Copy link
Copy Markdown
Collaborator
image 这种文档也不要进行上传啊,这是你个人开发的文档

@Wz58luck

Copy link
Copy Markdown
ContributorAuthor

已取消:改为基于最新 #346 重建分支,并以 preview 为 base 重新提交(大幅缩小 diff)。

Sign up for freeto 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.

[Feature] 编辑器支持按行号跳转

3 participants

@Wz58luck@xiaoyumuxi@1lck