UI highlight groups are drawn in the wrong color after too many different highlighting attributes are used
Los mantenedores suelen responder en 13 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c, vim
- Área
- frontend, performance
Línea de trabajo
Start in src/highlight.c at get_attr_entry(), where clearing the highlight tables triggers the redraw. Read how highlight changes notify the screen and inspect the redraw behavior when many attributes are created; the report says setting need_highlight_changed there restores the expected colors. Done means the reproduction keeps LineNr red on blue after scrolling through the generated terminal output.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Steps to reproduce
- Save this as
repro.vim(needspython3):
set termguicolors number
hi LineNr guifg=#ff0000 guibg=#0000ff
" print 80000 '#' characters, each with a different RGB foreground color
let s:py = 'import sys' .. "\n" .. 'for n in range(80000):' .. "\n"
\ .. ' sys.stdout.write("\x1b[38;2;%d;%d;%dm#" % (n >> 16 & 255, n >> 8 & 255, n & 255) + ("\x1b[0m\r\n" if n % 200 == 199 else ""))'
let s:buf = term_start(['python3', '-c', s:py],
\ {'hidden': 1, 'term_rows': 40, 'term_cols': 200,
\ 'exit_cb': {... -> timer_start(500, {... -> execute('buffer ' .. s:buf .. ' | redraw | echo "ready"', '')})}})
- In a terminal with true color support, run
vim --clean -S repro.vim - Wait until
readyis shown in the command line - Type
gg, then<C-F>10 times, thengg - The line numbers are drawn blue on yellow
Expected behaviour
The line numbers are drawn red on blue.
Version of Vim
9.2.1373
Environment
Operating system: macOS 26.7.3 (arm64)
Terminal: WezTerm 20240203-110809-5046fc22, inside tmux 3.8
Value of $TERM: tmux-256color
Shell: bash 5.3.20
Logs and stack traces
# First two screen lines after step 4, captured with `tmux capture-pane -e`
# 9.2.1373, unpatched:
^[[38;2;0;0;255m^[[48;2;255;255;0m 1 ^[[38;2;0;0;0m^[[49m#...
^[[38;2;0;0;255m^[[48;2;255;255;0m 2 ^[[38;2;0;0;200m^[[49m#...
# with the change below applied:
^[[38;2;255;0;0m^[[48;2;0;0;255m 1 ^[[38;2;0;0;0m^[[49m#...
^[[38;2;255;0;0m^[[48;2;0;0;255m 2 ^[[38;2;0;0;200m^[[49m#...
--- a/src/highlight.c
+++ b/src/highlight.c
@@ -2836,6 +2836,7 @@ get_attr_entry(garray_T *table, attrentry_T *aep)
clear_hl_tables();
+ need_highlight_changed = TRUE;
set_must_redraw(UPD_CLEAR);
for (i = 0; i < highlight_ga.ga_len; ++i)
- Lenguaje dominante
- Vim Script
- Estrellas
- 41.4k
- Forks
- 6.2k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
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 vim/vim
-
autoconf failes to find libsodium even when present due to implicit function declarationPosiblemente ocupada @coderjoe la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 13 días
-
`json_decode()` uses a number as a string pointer when 'encoding' has no converterPosiblemente ocupada @mattn la tomó hace 7 días. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 13 días
-
GTK4 build's v:servername is prefixed with $XDG_RUNTIME_DIR/vimQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
vim/vim#21624 · 3 comentarios ·
Los mantenedores suelen responder en 13 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 13 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
vim/vim#21204 · 14 comentarios ·
Los mantenedores suelen responder en 13 días
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug platform-desktop platform-web
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Termix-SSH/Termix#2072 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
prio:low scope:world
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
OliverRomhagen/vrigstad-joyride#849 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
genfeedai/genfeed.ai#11916 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100