Skip to content

Conversation

bfredl
Copy link
Member

@bfredl bfredl commented Nov 11, 2017

This enables a external ui to draw multiple top-level windows from one nvim instance. Currently, follows the simple formula "one tabpage == one top-level window". Thus, tab commands as tabnew and tabnext manage top-level windows when ext_multigrid is active.

Can be tested with the multigrid branch of python-gui neovim/python-gui#36. The pyhon-gui code is a big mess though because I changed my mind 5 times how to communicate grid/cursor focus to the UI. I might clean it up later. The rule I ended up with was to manage grids together with cursor position: the most recent set_grid tells the cilent the current grid, and together with the most recent set_cursor forms the 3-tuple (grid_id, row, col)which tells where drawing is done, and this state at the end of a "redraw" array of updates should be seen as the current focus. Perhaps the event should be changed to a joint grid_cursor_goto(grid_id, row, col) to make this explicit. Also resize and scroll operates on the currently focused grid.

Currently, keyboard input, mouse, and resizing with the mouse only works as expected for the (according to nvim) currently focused tabpage.

NB: expect a lot of redraw glitches and crashes. Before working much more on this I intend to get #6619 done, which already will introduce the generic multigrid abstraction, and "just" drawing buffer lines on a separate grid has lot less glitches than drawing exactly everything on multiple grids

Related: #2161 #5686 #2464

@bfredl bfredl added the ui-extensibility UI extensibility, events, protocol, externalized UI label Nov 11, 2017
@marvim marvim added the WIP label Nov 11, 2017
@bfredl bfredl mentioned this pull request Feb 18, 2018
@bfredl bfredl mentioned this pull request Dec 31, 2018
23 tasks
@justinmk justinmk changed the title [WIP] support multiple top-level windows [WIP] "tabgrid" (multiple top-level windows) Mar 2, 2019
@dundargoc dundargoc removed the WIP label Feb 7, 2023
@dundargoc dundargoc changed the title [WIP] "tabgrid" (multiple top-level windows) "tabgrid" (multiple top-level windows) Apr 2, 2023
@justinmk justinmk mentioned this pull request Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui-extensibility UI extensibility, events, protocol, externalized UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants