akinsho / akinsho/bufferline.nvim

[Bug]: When using sort_by 'insert_after_current' buffer ordinal number are no updated

Abierto
#976 2 comentarios 1 reacción 0 asignados Ver en GitHub
bug
Lenguaje dominante
Lua
Estrellas
4.4k
Forks
240
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Is there an existing issue for this?

- [X] I have searched the existing issues

### What happened?

I have numbers set to show ordinal number.

```lua
numbers = function(opts)
return string.format("%s", opts.lower(opts.ordinal))
end,
```

and set `sort_by` to `insert_after_current`

In this video, when a move to ordinal `1`, and open `init.lua`, buffer `init.lua` has ordinal `2` but it's showing `3`.

https://github.com/user-attachments/assets/71caf822-bce7-4a14-be24-1aa07144cacb

you can see when I go to ordinal `2` it goes to the right buffer, but the ordinal number is not refreshing.

lua require("bufferline").go_to_buffer(2, true)

### What did you expect to happen?

Expected behaviour should be refresh the ordinal number

### Config

```lua
return {
"akinsho/bufferline.nvim",
branch = "main",
dependencies = "nvim-tree/nvim-web-devicons",
init = function()
require("bufferline").setup({
options = {
mode = "buffers",
themable = true,
numbers = function(opts)
return string.format("%s", opts.lower(opts.ordinal))
end,
sort_by = 'insert_after_current',
},
})
end,
}

```

### Additional Information

...

### commit

_No response_

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.