Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ext_multigrid: Missing msg_set_pos and win_pos notifications upon reattach #19559

Open
adament opened this issue Jul 28, 2022 · 1 comment
Open
Labels
api libnvim, Nvim RPC API bug issues reporting wrong behavior rpc ui-extensibility UI extensibility, events, protocol

Comments

@adament
Copy link

adament commented Jul 28, 2022

Neovim version (nvim -v)

0.7.2 and 0.7.0

Vim (not Nvim) behaves the same?

NA

Operating system/version

Linux NixOS

Terminal name/version

alacritty

$TERM environment variable

alacritty

Installation

GitHub binary release and NixOS 22.05 package

How to reproduce the issue

I use the following test.py script to emulate a super simple UI:

#!/usr/bin/env python
from pynvim import attach
nvim = attach('socket', path='my_socket')
def notification_cb(name, args):
    if name == 'redraw':
        print(f"Redraw events ({len(args)}):")
        for x in args:
            print(f"    {x[0]}")
    else:
        print(f"Notification {name}", args)
nvim.run_loop(
    lambda name, args: print(f'Request {name}:', args),
    notification_cb,
    lambda: nvim.api.ui_attach(100, 100, {'rgb': True, 'ext_linegrid': True, 'ext_multigrid': True}),
)

Then I run in one terminal:

nvim --clean --headless --listen 'my_socket'

And in another:

./test.py
<Ctrl-C>
./test.py
<Ctrl-C>

Expected behavior

I would expect to get functionally the same UI notifications upon first attach and later reattach of the UI. Specifically at least all the same message types should be sent for the first attach and later reattach.

Actual behavior

However upon reattach (second run of test.py) I do not get any win_pos or msg_set_pos notifications. Output of first ./test.py

Redraw events (17):
    option_set
    default_colors_set
    hl_attr_define
    hl_group_set
    option_set
    default_colors_set
    grid_resize
    grid_clear
    grid_resize
    msg_set_pos
    win_viewport
    grid_resize
    grid_line
    win_pos
    win_viewport
    grid_cursor_goto
    flush
Redraw events (4):
    mode_info_set
    mode_change
    mouse_off
    flush

Output of second:

edraw events (14):
    option_set
    default_colors_set
    hl_attr_define
    hl_group_set
    option_set
    default_colors_set
    grid_resize
    grid_clear
    win_viewport
    grid_resize
    grid_line
    win_viewport
    grid_cursor_goto
    flush
Redraw events (4):
    mode_info_set
    mode_change
    mouse_off
    flush
@adament adament added the bug issues reporting wrong behavior label Jul 28, 2022
@zeertzjq zeertzjq added the ui-extensibility UI extensibility, events, protocol label Jul 28, 2022
@williamhCode
Copy link

williamhCode commented Apr 27, 2024

any updates on this issue?

@justinmk justinmk added api libnvim, Nvim RPC API rpc labels Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api libnvim, Nvim RPC API bug issues reporting wrong behavior rpc ui-extensibility UI extensibility, events, protocol
Projects
None yet
Development

No branches or pull requests

4 participants