Unified Diff: Preserve cursor position and active diff when switching to/from 2-way compare
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Trace the switch actions in the unified diff toolbar and the 2-way compare editor, then inspect how each presentation determines its active hunk, cursor position, and scroll location. Done means switching in either direction restores the equivalent active hunk, caret location, and visible context instead of resetting to the first diff.
由索引模型根据 Issue 内容生成。
描述
Problem
The unified diff toolbar provides an action to open the diff in the traditional 2-way compare editor. Conversely, the 2-way compare editor provides an action to switch back to the unified diff presentation. However, switching between the two presentations does not preserve context: the cursor position, scroll position, and the currently active diff hunk are lost, and the view always resets to the first diff.
Expected Behavior
When switching between unified diff and 2-way compare editor (in either direction), the following context should be restored in the target presentation:
- The active diff hunk — the diff closest to the cursor or the one explicitly navigated to should remain selected/focused.
- The cursor position — the caret should be placed at the equivalent location in the target editor.
- The scroll position — the target editor should scroll to bring the active diff into view.
This makes switching between presentations a non-destructive operation and allows users to freely alternate between the two views without losing their place.
- 主要语言
- Java
- 星标
- 165
- 派生
- 174
- 平均合并
- 2 天 20 小时
- 30 天内合并 PR
- 39
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
eclipse-platform/eclipse.platform 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
eclipse-platform/eclipse.platform#2940 ·
维护者通常 1 天内回复
-
Terminal views all show same name 'Terminal' in Ctrl+F7 view switcher popup可能已有人在做 @ravnskjaer 于 4 天前认领。 未关闭bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 68/100
eclipse-platform/eclipse.platform#2774 · 4 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
eclipse-platform/eclipse.platform#2593 · 7 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 4/5 3-5 天 新手友好度 42/100
eclipse-platform/eclipse.platform#3015 ·
维护者通常 1 天内回复
-
NPE in AbstractWindowListener.windowOpened when ConsoleManager service is null可能已有人在做 @SougandhS 于 1 天前认领。 未关闭bug
难度 3/5 1-2 天 新手友好度 25/100
eclipse-platform/eclipse.platform#3012 ·
维护者通常 1 天内回复
查看 eclipse-platform/eclipse.platform 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 77/100
apache/rocketmq-dashboard#6610 ·
维护者通常 3 天内回复
-
Citationcount column sorts alphabetically instead of numerically可能已有人在做 @kpunia306 今天认领。 未关闭status: needs-triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
`RedisList.reversed()` view returns an empty `range` and `trim` removes all elements可能已有人在做 @CCCLL 今天认领。 未关闭status: waiting-for-triage
难度 2/5 1-3 小时 新手友好度 72/100
spring-projects/spring-data-redis#3461 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 73/100
javapathfinder/jpf-core#649 ·
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
devops-thiago/ThrillhouseBot#1093 ·
维护者通常 1 天内回复