mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
multigrid: rename event to win_pos, make grid first
This commit is contained in:
@@ -84,10 +84,10 @@ void grid_scroll(Integer grid, Integer top, Integer bot,
|
|||||||
void grid_destroy(Integer grid)
|
void grid_destroy(Integer grid)
|
||||||
FUNC_API_SINCE(5) FUNC_API_REMOTE_ONLY;
|
FUNC_API_SINCE(5) FUNC_API_REMOTE_ONLY;
|
||||||
|
|
||||||
void win_position(Integer win, Integer grid, Integer startrow,
|
void win_pos(Integer grid, Integer win, Integer startrow,
|
||||||
Integer startcol, Integer width, Integer height)
|
Integer startcol, Integer width, Integer height)
|
||||||
FUNC_API_SINCE(5) FUNC_API_REMOTE_ONLY;
|
FUNC_API_SINCE(5) FUNC_API_REMOTE_ONLY;
|
||||||
void win_hide(Integer win, Integer grid)
|
void win_hide(Integer grid)
|
||||||
FUNC_API_SINCE(5) FUNC_API_REMOTE_ONLY;
|
FUNC_API_SINCE(5) FUNC_API_REMOTE_ONLY;
|
||||||
void win_scroll_over_start(void)
|
void win_scroll_over_start(void)
|
||||||
FUNC_API_SINCE(5) FUNC_API_REMOTE_ONLY;
|
FUNC_API_SINCE(5) FUNC_API_REMOTE_ONLY;
|
||||||
|
@@ -6100,10 +6100,10 @@ void win_ui_flush(void)
|
|||||||
FOR_ALL_TAB_WINDOWS(tp, wp) {
|
FOR_ALL_TAB_WINDOWS(tp, wp) {
|
||||||
if (wp->w_pos_changed && wp->w_grid.ScreenLines != NULL) {
|
if (wp->w_pos_changed && wp->w_grid.ScreenLines != NULL) {
|
||||||
if (tp == curtab) {
|
if (tp == curtab) {
|
||||||
ui_call_win_position(wp->handle, wp->w_grid.handle, wp->w_winrow,
|
ui_call_win_pos(wp->w_grid.handle, wp->handle, wp->w_winrow,
|
||||||
wp->w_wincol, wp->w_width, wp->w_height);
|
wp->w_wincol, wp->w_width, wp->w_height);
|
||||||
} else {
|
} else {
|
||||||
ui_call_win_hide(wp->handle, wp->w_grid.handle);
|
ui_call_win_hide(wp->w_grid.handle);
|
||||||
}
|
}
|
||||||
wp->w_pos_changed = false;
|
wp->w_pos_changed = false;
|
||||||
}
|
}
|
||||||
|
@@ -157,6 +157,7 @@ function Screen.new(width, height)
|
|||||||
cmdline_block = {},
|
cmdline_block = {},
|
||||||
wildmenu_items = nil,
|
wildmenu_items = nil,
|
||||||
wildmenu_selected = nil,
|
wildmenu_selected = nil,
|
||||||
|
win_position = nil,
|
||||||
_session = nil,
|
_session = nil,
|
||||||
_default_attr_ids = nil,
|
_default_attr_ids = nil,
|
||||||
_default_attr_ignore = nil,
|
_default_attr_ignore = nil,
|
||||||
@@ -801,10 +802,7 @@ function Screen:_handle_hl_attr_define(id, rgb_attrs, cterm_attrs, info)
|
|||||||
self._new_attrs = true
|
self._new_attrs = true
|
||||||
end
|
end
|
||||||
|
|
||||||
function Screen:_handle_win_position(win, grid, startrow, startcol, width, height)
|
function Screen:_handle_win_pos(grid, win, startrow, startcol, width, height)
|
||||||
if self.win_position == nil then
|
|
||||||
self.win_position = {}
|
|
||||||
end
|
|
||||||
self.win_position[grid] = {
|
self.win_position[grid] = {
|
||||||
win = win,
|
win = win,
|
||||||
startrow = startrow,
|
startrow = startrow,
|
||||||
@@ -815,6 +813,10 @@ function Screen:_handle_win_position(win, grid, startrow, startcol, width, heigh
|
|||||||
-- TODO(utkarshme): Take apt action
|
-- TODO(utkarshme): Take apt action
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Screen:_handle_win_hide(grid)
|
||||||
|
self.win_position[grid] = nil
|
||||||
|
end
|
||||||
|
|
||||||
function Screen:get_hl(val)
|
function Screen:get_hl(val)
|
||||||
if self._options.ext_newgrid then
|
if self._options.ext_newgrid then
|
||||||
return self._attr_table[val][1]
|
return self._attr_table[val][1]
|
||||||
|
Reference in New Issue
Block a user