Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#2,947 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
55/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
java
Área
desktop, devtools

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Java
Estrellas
165
Forks
174
Merge medio
2 d 17 h
PR fusionados (30 d)
43

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eclipse-platform/eclipse.platform

Todos los issues de eclipse-platform/eclipse.platform

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.