Skip to content

UI protocol: scrolling up sent as grid_line events instead of grid_scroll #12424

@glacambre

Description

@glacambre
  • nvim --version: NVIM v0.5.0-519-g74fed7d50
  • UI extensions: ext_linegrid=true, ext_multigrid=false, ext_messages=false, rgb=true

Steps to reproduce using nvim -u NORC

Create a 20 lines x 80 columns UI showing a buffer containing ~1000 lines and :set nu. Go to the bottom of the screen and press k to scroll up.

Actual behaviour

Neovim sends the following events:

["grid_line",[1,29,71,[["g",1],["k"]]]]
["grid_line",[1,29,71,[[" ",1,2]]]]
["grid_line",[1,1,0,[[" ",67],["9"],["7"],["2"],[" "],[" ",0,77]]],[1,2,0,[[" ",67],["9"],["7"],["3"],[" "],[" ",0,77]]],[1,3,0,[[" ",67],["9"],["7"],["4"],[" "],[" ",0,77]]],[1,4,0,[[" ",67],["9"],["7"],["5"],[" "],[" ",0,77]]],[1,5,0,[[" ",67],["9"],["7"],["6"],[" "],[" ",0,77]]],[1,6,0,[[" ",67],["9"],["7",67,2],[" "],[" ",0,77]]],[1,7,0,[[" ",67],["9"],["7"],["8"],[" "],[" ",0,77]]],[1,8,0,[[" ",67],["9"],["7"],["9"],[" "],[" ",0,77]]],[1,9,0,[[" ",67],["9"],["8"],["0"],[" "],[" ",0,77]]],[1,10,0,[[" ",67],["9"],["8"],["1"],[" "],[" ",0,77]]],[1,11,0,[[" ",67],["9"],["8"],["2"],[" "],[" ",0,77]]],[1,12,0,[[" ",67],["9"],["8"],["3"],[" "],[" ",0,77]]],[1,13,0,[[" ",67],["9"],["8"],["4"],[" "],[" ",0,77]]],[1,14,0,[[" ",67],["9"],["8"],["5"],[" "],[" ",0,77]]],[1,15,0,[[" ",67],["9"],["8"],["6"],[" "],[" ",0,77]]],[1,16,0,[[" ",67],["9"],["8"],["7"],[" "],[" ",0,77]]],[1,17,0,[[" ",67],["9"],["8",67,2],[" "],[" ",0,77]]],[1,18,0,[[" ",67],["9"],["8"],["9"],[" "],[" ",0,77]]],[1,19,0,[[" ",67],["9",67,2],["0"],[" "],[" ",0,77]]],[1,20,0,[[" ",67],["9",67,2],["1"],[" "],[" ",0,77]]],[1,21,0,[[" ",67],["9",67,2],["2"],[" "],[" ",0,77]]],[1,22,0,[[" ",67],["9",67,2],["3"],[" "],[" ",0,77]]],[1,23,0,[[" ",67],["9",67,2],["4"],[" "],[" ",0,77]]],[1,24,0,[[" ",67],["9",67,2],["5"],[" "],[" ",0,77]]],[1,25,0,[[" ",67],["9",67,2],["6"],[" "],[" ",0,77]]],[1,26,0,[[" ",67],["9",67,2],["7"],[" "],[" ",0,77]]],[1,27,0,[[" ",67],["9",67,2],["8"],[" "],[" ",0,77]]],[1,28,0,[[" ",67],["9",67,3],[" "],[" ",0,77]]],[1,0,0,[[" ",67],["9"],["7"],["1"],[" "],[" ",0,77]]]]

Expected behaviour

Neovim sends the following events:

["grid_line",[1,29,71,[["g",1],["k"]]]]
["grid_line",[1,29,71,[[" ",1,2]]]]
["grid_scroll",[1,0,29,0,82,-1,0]]
["grid_line",[1,28,0,[["1",67],["0",67,3],[" "],[" ",0,77]]]]

Since UI bugs aren't easy to reproduce I'll investigate myself. I'm just opening this here so that I don't forget.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ui-extensibilityUI extensibility, events, protocol, externalized UI

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions