💡 Targeted SGR channel resets instead of a blanket reset
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 76/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- c, typescript
- Área
- cli, performance
Línea de trabajo
Empieza por src/clayterm.c:90 en emit_attr, especialmente el restablecimiento general en :95 y la emisión de primer plano/fondo en :114/:125. Ejecuta test/targeted-sgr-resets.test.ts o inspecciona la reproducción vinculada para establecer la salida actual. Se considera terminado cuando los canales modificados usan restablecimientos predeterminados específicos, los canales sin cambios permanecen intactos y la prueba pasa.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem?
On every attribute change, the renderer tears down all SGR state with a blanket \x1b[0m before re-emitting, instead of resetting only the channel that changed (fg vs bg). A red-background cell followed by a default cell generates ...\x1b[48;2;255;0;0mA\x1b[0m... rather than a clean \x1b[49m, resulting in more bytes to process and unnecessary broken foreground sections.
Describe the solution you'd like
Diff the previous and current cell per channel and emit targeted resets when that channel actually changes: \x1b[39m to return the foreground to default, \x1b[49m for the background. Unchanged channels should remain intact across the run. The visible result is identical; the output is smaller and color runs stay continuous.
Describe alternatives you've considered
Keeping the blanket reset and trimming elsewhere doesn't help—the reset is exactly what forces the re-emit. The per-channel diff has to live in emit_attr, alongside the lastfg/lastbg state it already tracks.
Additional context
Failing test case on nm/repro/targeted-sgr-resets (test · diff).
The change likely lives in emit_attr (src/clayterm.c:90)—the blanket reset at :95, foreground/background emit at :114/:125.
- Lenguaje dominante
- TypeScript
- Estrellas
- 42
- Forks
- 2
- Merge medio
- 2 d 5 h
- PR fusionados (30 d)
- 12
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de bombshell-dev/tty
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
bombshell-dev/tty#129 ·
-
question
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
bombshell-dev/tty#112 ·
-
enhancement high priority
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
bombshell-dev/tty#83 · 2 comentarios ·
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
bombshell-dev/tty#82 ·
-
bug
bombshell-dev/tty#81 · 1 asignado ·
Todos los issues de bombshell-dev/tty
Issues similares
-
comp/desktop P3 type/bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
NousResearch/hermes-agent#118866 ·
-
Browser Waiting for: Product Owner
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
getsentry/sentry-javascript#24577 · 1 comentario ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
agilepathway/label-checker#640 ·
-
Plugin stuck at "loading" on DSH 0.1.6-alpha.2 — turnTail list slot registration missing options.id Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
Add 2021 Cup data to website Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
chrisparsons83/flexspotff#153 ·