Compare commits

...

3 Commits

Author SHA1 Message Date
glepnir d5b3170c23
Merge e45ee5adf8 into 5e98439f6d 2024-05-05 12:02:43 -04:00
Evgeni Chasnovski 5e98439f6d
fix(defaults): diagnostic mappings descriptions #28646 2024-05-05 07:45:47 -07:00
glepnir e45ee5adf8 fix(terminal): handler cursor shape correctly 2024-01-01 18:48:30 +08:00
6 changed files with 27 additions and 14 deletions

View File

@ -183,26 +183,22 @@ do
do
vim.keymap.set('n', ']d', function()
vim.diagnostic.goto_next({ float = false })
end, {
desc = 'Jump to the next diagnostic with the highest severity',
})
end, { desc = 'Jump to the next diagnostic' })
vim.keymap.set('n', '[d', function()
vim.diagnostic.goto_prev({ float = false })
end, {
desc = 'Jump to the previous diagnostic with the highest severity',
})
end, { desc = 'Jump to the previous diagnostic' })
vim.keymap.set('n', '<C-W>d', function()
vim.diagnostic.open_float()
end, {
desc = 'Open a floating window showing diagnostics under the cursor',
})
end, { desc = 'Show diagnostics under the cursor' })
vim.keymap.set('n', '<C-W><C-D>', '<C-W>d', {
remap = true,
desc = 'Open a floating window showing diagnostics under the cursor',
})
vim.keymap.set(
'n',
'<C-W><C-D>',
'<C-W>d',
{ remap = true, desc = 'Show diagnostics under the cursor' }
)
end
end

View File

@ -35,6 +35,10 @@ void set_title(String title)
FUNC_API_SINCE(3);
void set_icon(String icon)
FUNC_API_SINCE(3);
void set_cursor(void)
FUNC_API_SINCE(3);
void reset_cursor(void)
FUNC_API_SINCE(3);
void screenshot(String path)
FUNC_API_SINCE(7);
void option_set(String name, Object value)

View File

@ -1740,6 +1740,7 @@ void enter_buffer(buf_T *buf)
curwin->w_topfill = 0;
apply_autocmds(EVENT_BUFENTER, NULL, NULL, false, curbuf);
apply_autocmds(EVENT_BUFWINENTER, NULL, NULL, false, curbuf);
ui_call_set_cursor();
}
// If autocommands did not change the cursor position, restore cursor lnum

View File

@ -29,7 +29,7 @@ typedef enum {
typedef enum {
SHAPE_BLOCK = 0, ///< block cursor
SHAPE_HOR = 1, ///< horizontal bar cursor
SHAPE_VER = 2, ///< vertical bar cursor
SHAPE_VER = 2, ///< vertical bar cursor
} CursorShape;
#define MSHAPE_NUMBERED 1000 // offset for shapes identified by number

View File

@ -844,6 +844,7 @@ void setcursor_mayforce(win_T *wp, bool force)
grid_adjust(&grid, &row, &col);
ui_grid_cursor_goto(grid->handle, row, col);
ui_call_reset_cursor();
}
}

View File

@ -1193,6 +1193,17 @@ void tui_mode_info_set(TUIData *tui, bool guicursor_enabled, Array args)
tui_set_mode(tui, tui->showing_mode);
}
void tui_set_cursor(TUIData *tui)
{
tui_set_mode(tui, tui->showing_mode);
}
void tui_reset_cursor(TUIData *tui)
{
unibi_out_ext(tui, tui->unibi_ext.reset_cursor_color);
unibi_out_ext(tui, tui->unibi_ext.reset_cursor_style);
}
void tui_update_menu(TUIData *tui)
{
// Do nothing; menus are for GUI only