halfbrained / cuda_lsp

LSP Client plugin for CudaText
6 stars 4 forks source link

strange with Hover form #82

Closed Alexey-T closed 3 years ago

Alexey-T commented 3 years ago

cuda_testing_dlg_proc (CudaText repo) has such place

def callback_main_menu(id_dlg, id_ctl, data='', info=''):
    print('callback_main_menu')
    nctl = dlg_proc(id_dlg, DLG_CTL_FIND, prop='btn_menu')
    d = dlg_proc(id_dlg, DLG_CTL_PROP_GET, index=nctl)

    nx = d['x']
    ny = d['y']+d['h']
    nx, ny = dlg_proc(id_dlg, DLG_COORD_LOCAL_TO_SCREEN, index=nx, index2=ny)

    h_menu = menu_proc(0, MENU_CREATE)
    menu_proc(h_menu, MENU_ADD, command=2700, caption='About1')
    menu_proc(h_menu, MENU_ADD, command=2700, caption='About2')
    menu_proc(h_menu, MENU_ADD, command=2700, caption='About3')
    menu_proc(h_menu, MENU_SHOW, command='%d,%d'%(nx, ny))

Hover-- works for 'menu_proc' in last lines. but don't work for 'h_menu' in last 5 lines! (hover dlg don't appear)

halfbrained commented 3 years ago

On hover server gives empty response there, I think it can't know here what menu_proc() returns.

Do you think maybe a statusbar message is needed here, when server returns empty response? Like "Hover: no info"?

Alexey-T commented 3 years ago

yes -it will be better here.

halfbrained commented 3 years ago

thanks, added, much better now :)