Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Unified Diff: Preserve cursor position and active diff when switching to/from 2-way compare

Đang mở
#2,947 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
desktop, devtools

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Java
Star
165
Fork
174
Merge trung bình
2 ngày 20 giờ
Pull request đã merge (30 ngày)
39

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-platform/eclipse.platform

Tất cả issue của eclipse-platform/eclipse.platform

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.