feat(ui): include compositor info with multigrid

Provide compositor information, like composition index and absolute
position.
This commit is contained in:
Fred Sundvik
2024-11-04 20:49:45 +02:00
committed by bfredl
parent c58c650adf
commit f29856d034
13 changed files with 666 additions and 397 deletions

View File

@@ -174,6 +174,7 @@ TUI
UI
• |:checkhealth| shows a summary in the header for every healthcheck.
• |ui-multigrid| provides composition information and absolute coordinates.
VIMSCRIPT

View File

@@ -609,12 +609,31 @@ tabs.
size). If the window was previously hidden, it should now be shown
again.
["win_float_pos", grid, win, anchor, anchor_grid, anchor_row, anchor_col, mouse_enabled, zindex] ~
Display or reconfigure floating window `win`. The window should be
displayed above another grid `anchor_grid` at the specified position
`anchor_row` and `anchor_col`. For the meaning of `anchor` and more details
of positioning, see |nvim_open_win()|. `mouse_enabled` is true if the
window can receive mouse events.
["win_float_pos", grid, win, anchor, anchor_grid, anchor_row, anchor_col, mouse_enabled, zindex, compindex, screen_row, screen_col] ~
Display or reconfigure floating window `win`.
There are two alternative ways of positioning the window
- Manually - The window should be displayed above another grid
`anchor_grid` at the specified position `anchor_row` and
`anchor_col`. For the meaning of `anchor` and more details of
positioning, see |nvim_open_win()|. NOTE: you have to manually
ensure that the window fits the screen, possibly by further
reposition it. Ignore `screen_row` and `screen_col` in this case.
- Let nvim take care of the positioning - You can ignore `anchor`
and display the window at `screen_row` and `screen_col`.
`mouse_enabled` is true if the window can receive mouse events.
`zindex` is the configured zindex, while `compindex` is the exact
rendering order of the windows determined by nvim. To render exactly
like the TUI, first render all the non-floating windows, then render
in the `compindex` order, overwriting any floating window cells.
Finally, blend the floating window cells against the non-floating
background. To add more blending, you can group the windows by zindex,
and blend between the layers. But note that windows inside the same
zindex should still overwrite previous cells inside the same layer
without blending. This ensures that plugins that render multiple
windows, to add borders for example, work as expected.
["win_external_pos", grid, win] ~
Display or reconfigure external window `win`. The window should be
@@ -627,7 +646,7 @@ tabs.
["win_close", grid] ~
Close the window.
["msg_set_pos", grid, row, scrolled, sep_char] ~
["msg_set_pos", grid, row, scrolled, sep_char, zindex, compindex] ~
Display messages on `grid`. The grid will be displayed at `row` on
the default grid (grid=1), covering the full column width. `scrolled`
indicates whether the message area has been scrolled to cover other
@@ -638,6 +657,10 @@ tabs.
When |ui-messages| is active, no message grid is used, and this event
will not be sent.
`zindex` and `compindex` have the same meaning as for `win_float_pos`.
The `zindex` always has a fixed value of 200 and included for
completeness.
["win_viewport", grid, win, topline, botline, curline, curcol, line_count, scroll_delta] ~
Indicates the range of buffer text displayed in the window, as well
as the cursor position in the buffer. All positions are zero-based.

View File

@@ -102,7 +102,8 @@ void win_pos(Integer grid, Window win, Integer startrow, Integer startcol, Integ
Integer height)
FUNC_API_SINCE(6) FUNC_API_REMOTE_ONLY;
void win_float_pos(Integer grid, Window win, String anchor, Integer anchor_grid, Float anchor_row,
Float anchor_col, Boolean mouse_enabled, Integer zindex)
Float anchor_col, Boolean mouse_enabled, Integer zindex, Integer compindex,
Integer screen_row, Integer screen_col)
FUNC_API_SINCE(6) FUNC_API_REMOTE_ONLY;
void win_external_pos(Integer grid, Window win)
FUNC_API_SINCE(6) FUNC_API_REMOTE_ONLY;
@@ -111,7 +112,8 @@ void win_hide(Integer grid)
void win_close(Integer grid)
FUNC_API_SINCE(6) FUNC_API_REMOTE_ONLY;
void msg_set_pos(Integer grid, Integer row, Boolean scrolled, String sep_char)
void msg_set_pos(Integer grid, Integer row, Boolean scrolled, String sep_char, Integer zindex,
Integer compindex)
FUNC_API_SINCE(6) FUNC_API_COMPOSITOR_IMPL FUNC_API_CLIENT_IGNORE;
void win_viewport(Integer grid, Window win, Integer topline, Integer botline, Integer curline,

View File

@@ -102,11 +102,13 @@ struct ScreenGrid {
// compositor should momentarily ignore the grid. Used internally when
// moving around grids etc.
bool comp_disabled;
bool composition_updated;
};
#define SCREEN_GRID_INIT { 0, NULL, NULL, NULL, NULL, NULL, 0, 0, false, \
false, 0, 0, NULL, false, true, 0, \
0, 0, 0, 0, 0, false }
0, 0, 0, 0, 0, false, true }
typedef struct {
int args[3];

View File

@@ -171,7 +171,9 @@ static void ui_ext_msg_set_pos(int row, bool scrolled)
char buf[MAX_SCHAR_SIZE];
size_t size = schar_get(buf, curwin->w_p_fcs_chars.msgsep);
ui_call_msg_set_pos(msg_grid.handle, row, scrolled,
(String){ .data = buf, .size = size });
(String){ .data = buf, .size = size }, msg_grid.zindex,
(int)msg_grid.comp_index);
msg_grid.composition_updated = false;
}
void msg_grid_set_pos(int row, bool scrolled)
@@ -2529,6 +2531,13 @@ void msg_ui_refresh(void)
}
}
void msg_ui_flush(void)
{
if (ui_has(kUIMultigrid) && msg_grid.chars && msg_grid.composition_updated) {
ui_ext_msg_set_pos(msg_grid_pos, msg_scrolled);
}
}
/// Increment "msg_scrolled".
static void inc_msg_scrolled(void)
{

View File

@@ -75,6 +75,8 @@ static bool pum_rl; // true when popupmenu is drawn 'rightleft'
static int pum_anchor_grid; // grid where position is defined
static int pum_row; // top row of pum
static int pum_col; // left column of pum, right column if 'rightleft'
static int pum_win_row_offset; // The row offset needed to convert to window relative coordinates
static int pum_win_col_offset; // The column offset needed to convert to window relative coordinates
static int pum_left_col; // left column of pum, before padding or scrollbar
static bool pum_above; // pum is drawn above cursor line
@@ -151,7 +153,12 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, i
pum_is_drawn = true;
validate_cursor_col(curwin);
int above_row = 0;
int below_row = cmdline_row;
int below_row = MAX(cmdline_row, curwin->w_winrow + curwin->w_grid.rows);
if (State & MODE_CMDLINE) {
below_row = cmdline_row;
}
pum_win_row_offset = 0;
pum_win_col_offset = 0;
// wildoptions=pum
if (State == MODE_CMDLINE) {
@@ -170,10 +177,16 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, i
pum_anchor_grid = (int)curwin->w_grid.target->handle;
pum_win_row += curwin->w_grid.row_offset;
cursor_col += curwin->w_grid.col_offset;
if (!ui_has(kUIMultigrid) && curwin->w_grid.target != &default_grid) {
pum_anchor_grid = (int)default_grid.handle;
if (curwin->w_grid.target != &default_grid) {
pum_win_row += curwin->w_winrow;
cursor_col += curwin->w_wincol;
// ext_popupmenu should always anchor to the default grid when multigrid is disabled
if (!ui_has(kUIMultigrid)) {
pum_anchor_grid = (int)default_grid.handle;
} else {
pum_win_row_offset = curwin->w_winrow;
pum_win_col_offset = curwin->w_wincol;
}
}
}
@@ -189,7 +202,8 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, i
ADD_C(item, CSTR_AS_OBJ(array[i].pum_info));
ADD_C(arr, ARRAY_OBJ(item));
}
ui_call_popupmenu_show(arr, selected, pum_win_row, cursor_col,
ui_call_popupmenu_show(arr, selected, pum_win_row - pum_win_row_offset,
cursor_col - pum_win_col_offset,
pum_anchor_grid);
arena_mem_free(arena_finish(&arena));
} else {
@@ -221,18 +235,12 @@ void pum_display(pumitem_T *array, int size, int selected, bool array_changed, i
int min_row = 0;
int min_col = 0;
int max_col = Columns;
int max_col = MAX(Columns, curwin->w_wincol + curwin->w_grid.cols);
if (State & MODE_CMDLINE) {
max_col = Columns;
}
int win_start_col = curwin->w_wincol;
int win_end_col = W_ENDCOL(curwin);
if (!(State & MODE_CMDLINE) && ui_has(kUIMultigrid)) {
above_row -= curwin->w_winrow;
below_row = MAX(below_row - curwin->w_winrow, curwin->w_grid.rows);
min_row = -curwin->w_winrow;
min_col = -curwin->w_wincol;
max_col = MAX(Columns - curwin->w_wincol, curwin->w_grid.cols);
win_start_col = 0;
win_end_col = curwin->w_grid.cols;
}
// Figure out the size and position of the pum.
pum_height = MIN(size, PUM_DEF_HEIGHT);
@@ -580,13 +588,13 @@ void pum_redraw(void)
if (pum_rl) {
col_off = pum_width - 1;
assert(!(State & MODE_CMDLINE));
int win_end_col = ui_has(kUIMultigrid) ? curwin->w_grid.cols : W_ENDCOL(curwin);
int win_end_col = W_ENDCOL(curwin);
if (pum_col < win_end_col - 1) {
grid_width += 1;
extra_space = true;
}
} else {
int min_col = (!(State & MODE_CMDLINE) && ui_has(kUIMultigrid)) ? -curwin->w_wincol : 0;
int min_col = 0;
if (pum_col > min_col) {
grid_width += 1;
col_off = 1;
@@ -619,7 +627,9 @@ void pum_redraw(void)
const char *anchor = pum_above ? "SW" : "NW";
int row_off = pum_above ? -pum_height : 0;
ui_call_win_float_pos(pum_grid.handle, -1, cstr_as_string(anchor), pum_anchor_grid,
pum_row - row_off, pum_left_col, false, pum_grid.zindex);
pum_row - row_off - pum_win_row_offset, pum_left_col - pum_win_col_offset,
false, pum_grid.zindex, (int)pum_grid.comp_index, pum_grid.comp_row,
pum_grid.comp_col);
}
int scroll_range = pum_size - pum_height;
@@ -1305,36 +1315,47 @@ static void pum_position_at_mouse(int min_width)
int min_col = 0;
int max_row = Rows;
int max_col = Columns;
if (mouse_grid > 1) {
win_T *wp = get_win_by_grid_handle(mouse_grid);
int grid = mouse_grid;
int row = mouse_row;
int col = mouse_col;
pum_win_row_offset = 0;
pum_win_col_offset = 0;
if (grid > 1) {
win_T *wp = get_win_by_grid_handle(grid);
if (wp != NULL) {
min_row = -wp->w_winrow;
min_col = -wp->w_wincol;
max_row = MAX(Rows - wp->w_winrow, wp->w_grid.rows);
max_col = MAX(Columns - wp->w_wincol, wp->w_grid.cols);
row += wp->w_winrow;
col += wp->w_wincol;
pum_win_row_offset = wp->w_winrow;
pum_win_col_offset = wp->w_wincol;
if (wp->w_height_inner > 0 || wp->w_width_inner > 0) {
// When the user has requested a different grid size, let the popupmenu extend to the size
// of it.
max_row = MAX(Rows - wp->w_winrow, wp->w_winrow + wp->w_grid.rows);
max_col = MAX(Columns - wp->w_wincol, wp->w_wincol + wp->w_grid.cols);
}
}
}
if (pum_grid.handle != 0 && mouse_grid == pum_grid.handle) {
if (pum_grid.handle != 0 && grid == pum_grid.handle) {
// Repositioning the menu by right-clicking on itself
mouse_grid = pum_anchor_grid;
mouse_row += pum_row;
mouse_col += pum_left_col;
row += pum_row;
col += pum_left_col;
} else {
pum_anchor_grid = mouse_grid;
pum_anchor_grid = grid;
}
if (max_row - mouse_row > pum_size || max_row - mouse_row > mouse_row - min_row) {
if (max_row - row > pum_size || max_row - row > row - min_row) {
// Enough space below the mouse row,
// or there is more space below the mouse row than above.
pum_above = false;
pum_row = mouse_row + 1;
pum_row = row + 1;
if (pum_height > max_row - pum_row) {
pum_height = max_row - pum_row;
}
} else {
// Show above the mouse row, reduce height if it does not fit.
pum_above = true;
pum_row = mouse_row - pum_size;
pum_row = row - pum_size;
if (pum_row < min_row) {
pum_height += pum_row - min_row;
pum_row = min_row;
@@ -1342,20 +1363,20 @@ static void pum_position_at_mouse(int min_width)
}
if (pum_rl) {
if (mouse_col - min_col + 1 >= pum_base_width
|| mouse_col - min_col + 1 > min_width) {
if (col - min_col + 1 >= pum_base_width
|| col - min_col + 1 > min_width) {
// Enough space to show at mouse column.
pum_col = mouse_col;
pum_col = col;
} else {
// Not enough space, left align with window.
pum_col = min_col + MIN(pum_base_width, min_width) - 1;
}
pum_width = pum_col - min_col + 1;
} else {
if (max_col - mouse_col >= pum_base_width
|| max_col - mouse_col > min_width) {
if (max_col - col >= pum_base_width
|| max_col - col > min_width) {
// Enough space to show at mouse column.
pum_col = mouse_col;
pum_col = col;
} else {
// Not enough space, right align with window.
pum_col = max_col - MIN(pum_base_width, min_width);
@@ -1540,3 +1561,17 @@ void pum_make_popup(const char *path_name, int use_mouse_pos)
pum_show_popupmenu(menu);
}
}
void pum_ui_flush(void)
{
if (ui_has(kUIMultigrid) && pum_is_drawn && !pum_external && pum_grid.handle != 0
&& pum_grid.composition_updated) {
const char *anchor = pum_above ? "SW" : "NW";
int row_off = pum_above ? -pum_height : 0;
ui_call_win_float_pos(pum_grid.handle, -1, cstr_as_string(anchor), pum_anchor_grid,
pum_row - row_off - pum_win_row_offset, pum_left_col - pum_win_col_offset,
false, pum_grid.zindex, (int)pum_grid.comp_index, pum_grid.comp_row,
pum_grid.comp_col);
pum_grid.composition_updated = false;
}
}

View File

@@ -545,6 +545,9 @@ void ui_flush(void)
if (pending_cursor_update) {
ui_call_grid_cursor_goto(cursor_grid_handle, cursor_row, cursor_col);
pending_cursor_update = false;
// The cursor move might change the composition order, so flush again to update the windows that
// changed
win_ui_flush(false);
}
if (pending_mode_info_update) {
Arena arena = ARENA_EMPTY;

View File

@@ -117,17 +117,20 @@ void ui_comp_layers_adjust(size_t layer_idx, bool raise)
while (layer_idx < size - 1 && layer->zindex > layers.items[layer_idx + 1]->zindex) {
layers.items[layer_idx] = layers.items[layer_idx + 1];
layers.items[layer_idx]->comp_index = layer_idx;
layers.items[layer_idx]->composition_updated = true;
layer_idx++;
}
} else {
while (layer_idx > 0 && layer->zindex < layers.items[layer_idx - 1]->zindex) {
layers.items[layer_idx] = layers.items[layer_idx - 1];
layers.items[layer_idx]->comp_index = layer_idx;
layers.items[layer_idx]->composition_updated = true;
layer_idx--;
}
}
layers.items[layer_idx] = layer;
layer->comp_index = layer_idx;
layer->composition_updated = true;
}
/// Places `grid` at (col,row) position with (width * height) size.
@@ -140,6 +143,7 @@ bool ui_comp_put_grid(ScreenGrid *grid, int row, int col, int height, int width,
bool on_top)
{
bool moved;
grid->composition_updated = true;
grid->comp_height = height;
grid->comp_width = width;
@@ -193,12 +197,14 @@ bool ui_comp_put_grid(ScreenGrid *grid, int row, int col, int height, int width,
for (size_t i = kv_size(layers) - 1; i > insert_at; i--) {
kv_A(layers, i) = kv_A(layers, i - 1);
kv_A(layers, i)->comp_index = i;
kv_A(layers, i)->composition_updated = true;
}
kv_A(layers, insert_at) = grid;
grid->comp_row = row;
grid->comp_col = col;
grid->comp_index = insert_at;
grid->composition_updated = true;
}
if (moved && valid && ui_comp_should_draw()) {
compose_area(grid->comp_row, grid->comp_row + grid->rows,
@@ -222,9 +228,11 @@ void ui_comp_remove_grid(ScreenGrid *grid)
for (size_t i = grid->comp_index; i < kv_size(layers) - 1; i++) {
kv_A(layers, i) = kv_A(layers, i + 1);
kv_A(layers, i)->comp_index = i;
kv_A(layers, i)->composition_updated = true;
}
(void)kv_pop(layers);
grid->comp_index = 0;
grid->composition_updated = true;
// recompose the area under the grid
// inefficient when being overlapped: only draw up to grid->comp_index
@@ -256,9 +264,11 @@ void ui_comp_raise_grid(ScreenGrid *grid, size_t new_index)
for (size_t i = old_index; i < new_index; i++) {
kv_A(layers, i) = kv_A(layers, i + 1);
kv_A(layers, i)->comp_index = i;
kv_A(layers, i)->composition_updated = true;
}
kv_A(layers, new_index) = grid;
grid->comp_index = new_index;
grid->composition_updated = true;
for (size_t i = old_index; i < new_index; i++) {
ScreenGrid *grid2 = kv_A(layers, i);
int startcol = MAX(grid->comp_col, grid2->comp_col);
@@ -272,7 +282,7 @@ void ui_comp_raise_grid(ScreenGrid *grid, size_t new_index)
void ui_comp_grid_cursor_goto(Integer grid_handle, Integer r, Integer c)
{
if (!ui_comp_should_draw() || !ui_comp_set_grid((int)grid_handle)) {
if (!ui_comp_set_grid((int)grid_handle)) {
return;
}
int cursor_row = curgrid->comp_row + (int)r;
@@ -593,8 +603,10 @@ bool ui_comp_set_screen_valid(bool valid)
return old_val;
}
void ui_comp_msg_set_pos(Integer grid, Integer row, Boolean scrolled, String sep_char)
void ui_comp_msg_set_pos(Integer grid, Integer row, Boolean scrolled, String sep_char,
Integer zindex, Integer compindex)
{
msg_grid.composition_updated = true;
msg_grid.comp_row = (int)row;
if (scrolled && row > 0) {
msg_sep_row = (int)row - 1;

View File

@@ -62,6 +62,7 @@
#include "nvim/os/os_defs.h"
#include "nvim/path.h"
#include "nvim/plines.h"
#include "nvim/popupmenu.h"
#include "nvim/pos_defs.h"
#include "nvim/quickfix.h"
#include "nvim/search.h"
@@ -804,6 +805,12 @@ void ui_ext_win_position(win_T *wp, bool validate)
{
wp->w_pos_changed = false;
if (!wp->w_floating) {
if (ui_has(kUIMultigrid)) {
// Windows on the default grid don't necessarily have comp_col and comp_row set
// But the rest of the calculations relies on it
wp->w_grid_alloc.comp_col = wp->w_wincol;
wp->w_grid_alloc.comp_row = wp->w_winrow;
}
ui_call_win_pos(wp->w_grid_alloc.handle, wp->handle, wp->w_winrow,
wp->w_wincol, wp->w_width, wp->w_height);
return;
@@ -852,50 +859,51 @@ void ui_ext_win_position(win_T *wp, bool validate)
if (resort) {
ui_comp_layers_adjust(wp->w_grid_alloc.comp_index, raise);
}
if (ui_has(kUIMultigrid)) {
String anchor = cstr_as_string(float_anchor_str[c.anchor]);
if (!c.hide) {
bool valid = (wp->w_redr_type == 0 || ui_has(kUIMultigrid));
if (!valid && !validate) {
wp->w_pos_changed = true;
return;
}
// TODO(bfredl): ideally, compositor should work like any multigrid UI
// and use standard win_pos events.
bool east = c.anchor & kFloatAnchorEast;
bool south = c.anchor & kFloatAnchorSouth;
int comp_row = (int)row - (south ? wp->w_height_outer : 0);
int comp_col = (int)col - (east ? wp->w_width_outer : 0);
int above_ch = wp->w_config.zindex < kZIndexMessages ? (int)p_ch : 0;
comp_row += grid->comp_row;
comp_col += grid->comp_col;
comp_row = MAX(MIN(comp_row, Rows - wp->w_height_outer - above_ch), 0);
if (!c.fixed || east) {
comp_col = MAX(MIN(comp_col, Columns - wp->w_width_outer), 0);
}
wp->w_winrow = comp_row;
wp->w_wincol = comp_col;
if (!c.hide) {
ui_comp_put_grid(&wp->w_grid_alloc, comp_row, comp_col,
wp->w_height_outer, wp->w_width_outer, valid, false);
if (ui_has(kUIMultigrid)) {
String anchor = cstr_as_string(float_anchor_str[c.anchor]);
ui_call_win_float_pos(wp->w_grid_alloc.handle, wp->handle, anchor,
grid->handle, row, col, c.mouse,
wp->w_grid_alloc.zindex);
} else {
ui_call_win_hide(wp->w_grid_alloc.handle);
wp->w_grid_alloc.zindex, (int)wp->w_grid_alloc.comp_index,
wp->w_winrow,
wp->w_wincol);
}
ui_check_cursor_grid(wp->w_grid_alloc.handle);
wp->w_grid_alloc.mouse_enabled = wp->w_config.mouse;
if (!valid) {
wp->w_grid_alloc.valid = false;
redraw_later(wp, UPD_NOT_VALID);
}
} else {
bool valid = (wp->w_redr_type == 0);
if (!valid && !validate) {
wp->w_pos_changed = true;
return;
}
// TODO(bfredl): ideally, compositor should work like any multigrid UI
// and use standard win_pos events.
bool east = c.anchor & kFloatAnchorEast;
bool south = c.anchor & kFloatAnchorSouth;
int comp_row = (int)row - (south ? wp->w_height_outer : 0);
int comp_col = (int)col - (east ? wp->w_width_outer : 0);
int above_ch = wp->w_config.zindex < kZIndexMessages ? (int)p_ch : 0;
comp_row += grid->comp_row;
comp_col += grid->comp_col;
comp_row = MAX(MIN(comp_row, Rows - wp->w_height_outer - above_ch), 0);
if (!c.fixed || east) {
comp_col = MAX(MIN(comp_col, Columns - wp->w_width_outer), 0);
}
wp->w_winrow = comp_row;
wp->w_wincol = comp_col;
if (!c.hide) {
ui_comp_put_grid(&wp->w_grid_alloc, comp_row, comp_col,
wp->w_height_outer, wp->w_width_outer, valid, false);
ui_check_cursor_grid(wp->w_grid_alloc.handle);
wp->w_grid_alloc.mouse_enabled = wp->w_config.mouse;
if (!valid) {
wp->w_grid_alloc.valid = false;
redraw_later(wp, UPD_NOT_VALID);
}
} else {
ui_comp_remove_grid(&wp->w_grid_alloc);
if (ui_has(kUIMultigrid)) {
ui_call_win_hide(wp->w_grid_alloc.handle);
}
ui_comp_remove_grid(&wp->w_grid_alloc);
}
} else {
ui_call_win_external_pos(wp->w_grid_alloc.handle, wp->handle);
@@ -7456,18 +7464,25 @@ void win_get_tabwin(handle_T id, int *tabnr, int *winnr)
void win_ui_flush(bool validate)
{
FOR_ALL_TAB_WINDOWS(tp, wp) {
if (wp->w_pos_changed && wp->w_grid_alloc.chars != NULL) {
if ((wp->w_pos_changed || wp->w_grid_alloc.composition_updated)
&& wp->w_grid_alloc.chars != NULL) {
if (tp == curtab) {
ui_ext_win_position(wp, validate);
} else {
ui_call_win_hide(wp->w_grid_alloc.handle);
wp->w_pos_changed = false;
}
wp->w_grid_alloc.composition_updated = false;
}
if (tp == curtab) {
ui_ext_win_viewport(wp);
}
}
// The popupmenu could also have moved or changed its comp_index
pum_ui_flush();
// And the message
msg_ui_flush();
}
win_T *lastwin_nofloating(void)

File diff suppressed because it is too large Load Diff

View File

@@ -671,7 +671,7 @@ describe('ext_multigrid', function()
{21: }|
{22:~ }|*4
]], float_pos={
[4] = {1001, "SE", 2, 16, 58, true, 50};
[4] = {1001, "SE", 2, 16, 58, true, 50, 1, 8, 48};
}}
end)
@@ -693,7 +693,7 @@ describe('ext_multigrid', function()
{24: foo}|
{21: bar}|
]], float_pos={
[4] = {-1, "NW", 2, 15, 55, false, 100};
[4] = {-1, "NW", 2, 15, 55, false, 100, 1, 15, 55};
}}
feed('<C-E><Esc>')
@@ -715,7 +715,7 @@ describe('ext_multigrid', function()
{24: oof}|
{21: rab}|
]], float_pos={
[4] = {-1, "NW", 2, 16, 45, false, 100};
[4] = {-1, "NW", 2, 16, 45, false, 100, 1, 16, 45};
}}
feed('<C-E><Esc>')
@@ -737,7 +737,7 @@ describe('ext_multigrid', function()
{24: undefine }|
{21: unplace }|
]], float_pos={
[4] = {-1, "SW", 1, 13, 5, false, 250};
[4] = {-1, "SW", 1, 13, 5, false, 250, 2, 11, 5};
}}
end)
@@ -1346,7 +1346,7 @@ describe('ext_multigrid', function()
## grid 6
{21: Copy }|
]], float_pos={
[6] = {-1, "NW", 2, 2, 5, false, 250};
[6] = {-1, "NW", 2, 2, 5, false, 250, 2, 7, 36};
}}
feed('<Down><CR>')
screen:expect{grid=[[
@@ -1420,7 +1420,7 @@ describe('ext_multigrid', function()
## grid 6
{21: Copy }|
]], float_pos={
[6] = {-1, "NW", 4, 1, 63, false, 250};
[6] = {-1, "NW", 4, 1, 63, false, 250, 2, 1, 63};
}}
feed('<Down><CR>')
screen:expect{grid=[[
@@ -1542,7 +1542,7 @@ describe('ext_multigrid', function()
## grid 6
{21: Copy }|
]], float_pos={
[6] = {-1, "SW", 4, 9, 0, false, 250};
[6] = {-1, "SW", 4, 9, 0, false, 250, 2, 14, 0};
}}
feed('<Down><CR>')
screen:expect{grid=[[
@@ -1674,7 +1674,7 @@ describe('ext_multigrid', function()
## grid 6
{21: Copy }|
]], float_pos={
[6] = {-1, "NW", 4, 10, 0, false, 250};
[6] = {-1, "NW", 4, 10, 0, false, 250, 2, 16, 0};
}}
feed('<Down><CR>')
screen:expect{grid=[[

View File

@@ -1229,7 +1229,7 @@ describe('builtin popupmenu', function()
{n:hh }{s: }|
]],
float_pos = {
[5] = { -1, 'NW', 2, 2, 0, false, 100 },
[5] = { -1, 'NW', 2, 2, 0, false, 100, 1, 11, 0 },
},
}
else
@@ -1287,7 +1287,7 @@ describe('builtin popupmenu', function()
{n:hh }{s: }|
]],
float_pos = {
[5] = { -1, 'NW', 2, 2, 0, false, 100 },
[5] = { -1, 'NW', 2, 2, 0, false, 100, 1, 2, 0 },
},
}
else
@@ -1363,7 +1363,7 @@ describe('builtin popupmenu', function()
{n:mm }{s: }|
]],
float_pos = {
[5] = { -1, 'SW', 2, 12, 0, false, 100 },
[5] = { -1, 'SW', 2, 12, 0, false, 100, 1, 4, 0 },
},
}
else
@@ -1439,7 +1439,7 @@ describe('builtin popupmenu', function()
{n:ii }{s: }|
]],
float_pos = {
[5] = { -1, 'SW', 2, 8, 0, false, 100 },
[5] = { -1, 'SW', 2, 8, 0, false, 100, 1, 8, 0 },
},
}
else
@@ -1514,7 +1514,7 @@ describe('builtin popupmenu', function()
{n:hh }{s: }|
]],
float_pos = {
[5] = { -1, 'SW', 2, 8, 0, false, 100 },
[5] = { -1, 'SW', 2, 8, 0, false, 100, 1, 0, 0 },
},
}
else
@@ -1599,7 +1599,7 @@ describe('builtin popupmenu', function()
{n:ab6 }{s: }|
]],
float_pos = {
[5] = { -1, 'SW', 2, 6, 0, false, 100 },
[5] = { -1, 'SW', 2, 6, 0, false, 100, 1, 9, 0 },
},
})
else
@@ -1677,7 +1677,7 @@ describe('builtin popupmenu', function()
{n:ab5 }{s: }|
]],
float_pos = {
[5] = { -1, 'SW', 2, 5, 0, false, 100 },
[5] = { -1, 'SW', 2, 5, 0, false, 100, 1, 9, 0 },
},
})
else
@@ -1736,7 +1736,7 @@ describe('builtin popupmenu', function()
{n:three }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 0, false, 100 },
[4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 },
},
})
else
@@ -1773,7 +1773,7 @@ describe('builtin popupmenu', function()
{1:~ }|*2
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 0, false, 100 },
[4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 5, 0 },
},
})
else
@@ -1831,7 +1831,7 @@ describe('builtin popupmenu', function()
{n:aa7bb }{s: }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 0, false, 100 },
[4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 },
},
})
else
@@ -1974,8 +1974,8 @@ describe('builtin popupmenu', function()
},
},
float_pos = {
[5] = { -1, 'NW', 2, 1, 0, false, 100 },
[4] = { 1001, 'NW', 1, 1, 19, false, 50 },
[5] = { -1, 'NW', 2, 1, 0, false, 100, 2, 1, 0 },
[4] = { 1001, 'NW', 1, 1, 19, false, 50, 1, 1, 19 },
},
win_viewport = {
[2] = {
@@ -2054,8 +2054,8 @@ describe('builtin popupmenu', function()
},
},
float_pos = {
[5] = { -1, 'NW', 2, 1, 0, false, 100 },
[4] = { 1001, 'NW', 1, 1, 15, false, 50 },
[5] = { -1, 'NW', 2, 1, 0, false, 100, 2, 1, 0 },
[4] = { 1001, 'NW', 1, 1, 15, false, 50, 1, 1, 15 },
},
win_viewport = {
[2] = {
@@ -2131,7 +2131,7 @@ describe('builtin popupmenu', function()
},
},
float_pos = {
[5] = { -1, 'NW', 2, 1, 0, false, 100 },
[5] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 },
},
win_viewport = {
[2] = {
@@ -2211,8 +2211,8 @@ describe('builtin popupmenu', function()
},
},
float_pos = {
[5] = { -1, 'NW', 2, 1, 0, false, 100 },
[4] = { 1001, 'NW', 1, 1, 19, false, 50 },
[5] = { -1, 'NW', 2, 1, 0, false, 100, 2, 1, 0 },
[4] = { 1001, 'NW', 1, 1, 19, false, 50, 1, 1, 19 },
},
win_viewport = {
[2] = {
@@ -2295,8 +2295,8 @@ describe('builtin popupmenu', function()
},
},
float_pos = {
[5] = { -1, 'NW', 2, 1, 18, false, 100 },
[4] = { 1001, 'NW', 1, 1, 13, false, 50 },
[5] = { -1, 'NW', 2, 1, 18, false, 100, 2, 1, 18 },
[4] = { 1001, 'NW', 1, 1, 13, false, 50, 1, 1, 13 },
},
win_viewport = {
[2] = {
@@ -2383,8 +2383,8 @@ describe('builtin popupmenu', function()
},
},
float_pos = {
[5] = { -1, 'NW', 2, 1, 0, false, 100 },
[4] = { 1001, 'NW', 1, 1, 19, false, 50 },
[5] = { -1, 'NW', 2, 1, 0, false, 100, 2, 1, 0 },
[4] = { 1001, 'NW', 1, 1, 19, false, 50, 1, 1, 19 },
},
win_viewport = {
[2] = {
@@ -2475,8 +2475,8 @@ describe('builtin popupmenu', function()
},
},
float_pos = {
[5] = { 1001, 'NW', 1, 1, 19, false, 50 },
[4] = { -1, 'NW', 2, 1, 0, false, 100 },
[5] = { 1001, 'NW', 1, 1, 19, false, 50, 1, 1, 19 },
[4] = { -1, 'NW', 2, 1, 0, false, 100, 2, 1, 0 },
},
win_viewport = {
[2] = {
@@ -2599,7 +2599,7 @@ describe('builtin popupmenu', function()
{n: aac }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 2, 3, false, 100 },
[5] = { -1, 'NW', 4, 2, 3, false, 100, 1, 2, 3 },
},
}
else
@@ -2641,7 +2641,7 @@ describe('builtin popupmenu', function()
{n: aac }|
]],
float_pos = {
[5] = { -1, 'NW', 2, 3, 1, false, 100 },
[5] = { -1, 'NW', 2, 3, 1, false, 100, 1, 3, 13 },
},
}
else
@@ -2685,7 +2685,7 @@ describe('builtin popupmenu', function()
{n: aaabcdef}|
]],
float_pos = {
[5] = { -1, 'NW', 2, 3, 11, false, 100 },
[5] = { -1, 'NW', 2, 3, 11, false, 100, 1, 3, 23 },
},
}
else
@@ -2730,7 +2730,7 @@ describe('builtin popupmenu', function()
{n: aac }{s: }|
]],
float_pos = {
[5] = { -1, 'NW', 2, 4, -1, false, 100 },
[5] = { -1, 'NW', 2, 4, -1, false, 100, 1, 4, 11 },
},
}
else
@@ -2852,7 +2852,7 @@ describe('builtin popupmenu', function()
{s: Est }{c: }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 3, false, 100 },
[5] = { -1, 'NW', 4, 1, 3, false, 100, 1, 1, 3 },
},
})
else
@@ -2914,7 +2914,7 @@ describe('builtin popupmenu', function()
{s: Est }{c: }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 3, false, 100 },
[5] = { -1, 'NW', 4, 1, 3, false, 100, 1, 1, 3 },
},
})
else
@@ -2975,7 +2975,7 @@ describe('builtin popupmenu', function()
{s: est }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 3, false, 100 },
[5] = { -1, 'NW', 4, 1, 3, false, 100, 1, 1, 3 },
},
})
else
@@ -3035,7 +3035,7 @@ describe('builtin popupmenu', function()
{s: est }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 3, false, 100 },
[5] = { -1, 'NW', 4, 1, 3, false, 100, 1, 1, 3 },
},
})
else
@@ -3088,7 +3088,7 @@ describe('builtin popupmenu', function()
{s: est }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 3, false, 100 },
[5] = { -1, 'NW', 4, 1, 3, false, 100, 1, 1, 3 },
},
})
else
@@ -3140,7 +3140,7 @@ describe('builtin popupmenu', function()
{s: est }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 3, false, 100 },
[5] = { -1, 'NW', 4, 1, 3, false, 100, 1, 1, 3 },
},
})
else
@@ -3201,7 +3201,7 @@ describe('builtin popupmenu', function()
{s: est }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 3, false, 100 },
[5] = { -1, 'NW', 4, 1, 3, false, 100, 1, 1, 3 },
},
})
else
@@ -3261,7 +3261,7 @@ describe('builtin popupmenu', function()
{n: est }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 3, false, 100 },
[5] = { -1, 'NW', 4, 1, 3, false, 100, 1, 1, 3 },
},
})
else
@@ -3321,7 +3321,7 @@ describe('builtin popupmenu', function()
{n: est }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 3, false, 100 },
[5] = { -1, 'NW', 4, 1, 3, false, 100, 1, 1, 3 },
},
})
else
@@ -3381,7 +3381,7 @@ describe('builtin popupmenu', function()
{n: eö }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 2, false, 100 },
[5] = { -1, 'NW', 4, 1, 2, false, 100, 1, 1, 2 },
},
})
else
@@ -3440,7 +3440,7 @@ describe('builtin popupmenu', function()
{n: eö }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 2, false, 100 },
[5] = { -1, 'NW', 4, 1, 2, false, 100, 1, 1, 2 },
},
})
else
@@ -3499,7 +3499,7 @@ describe('builtin popupmenu', function()
{n: eö }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 2, false, 100 },
[5] = { -1, 'NW', 4, 1, 2, false, 100, 1, 1, 2 },
},
})
else
@@ -3551,7 +3551,7 @@ describe('builtin popupmenu', function()
{n: bar }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, 4, false, 100 },
[5] = { -1, 'NW', 4, 1, 4, false, 100, 1, 1, 4 },
},
})
else
@@ -3643,7 +3643,7 @@ describe('builtin popupmenu', function()
{n: thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 25, false, 100 },
[4] = { -1, 'NW', 2, 1, 25, false, 100, 1, 1, 25 },
},
})
else
@@ -3678,7 +3678,7 @@ describe('builtin popupmenu', function()
{s:thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 2, 0, false, 100 },
[4] = { -1, 'NW', 2, 2, 0, false, 100, 1, 2, 0 },
},
})
else
@@ -3714,7 +3714,7 @@ describe('builtin popupmenu', function()
{n: thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 25, false, 100 },
[4] = { -1, 'NW', 2, 1, 25, false, 100, 1, 1, 25 },
},
})
else
@@ -3749,7 +3749,7 @@ describe('builtin popupmenu', function()
{n:thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 2, 0, false, 100 },
[4] = { -1, 'NW', 2, 2, 0, false, 100, 1, 2, 0 },
},
})
else
@@ -3784,7 +3784,7 @@ describe('builtin popupmenu', function()
{n: thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 27, false, 100 },
[4] = { -1, 'NW', 2, 1, 27, false, 100, 1, 1, 27 },
},
})
else
@@ -3819,7 +3819,7 @@ describe('builtin popupmenu', function()
{n: thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 2, 3, false, 100 },
[4] = { -1, 'NW', 2, 2, 3, false, 100, 1, 2, 3 },
},
})
else
@@ -3856,7 +3856,7 @@ describe('builtin popupmenu', function()
{n: thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 2, 3, false, 100 },
[4] = { -1, 'NW', 2, 2, 3, false, 100, 1, 2, 3 },
},
})
else
@@ -3888,7 +3888,7 @@ describe('builtin popupmenu', function()
{n: thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 2, 3, false, 100 },
[4] = { -1, 'NW', 2, 2, 3, false, 100, 1, 2, 3 },
},
})
else
@@ -3919,7 +3919,7 @@ describe('builtin popupmenu', function()
{n: thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 2, 10, false, 100 },
[4] = { -1, 'NW', 2, 2, 10, false, 100, 1, 2, 10 },
},
})
else
@@ -3960,7 +3960,7 @@ describe('builtin popupmenu', function()
{n: thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 25, false, 100 },
[4] = { -1, 'NW', 2, 1, 25, false, 100, 1, 1, 25 },
},
})
else
@@ -3996,7 +3996,7 @@ describe('builtin popupmenu', function()
{n: thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 3, 3, false, 100 },
[4] = { -1, 'NW', 2, 3, 3, false, 100, 1, 3, 3 },
},
})
else
@@ -4058,7 +4058,7 @@ describe('builtin popupmenu', function()
{n: gniht }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 2, false, 100 },
[4] = { -1, 'NW', 2, 1, 2, false, 100, 1, 1, 2 },
},
})
else
@@ -4092,7 +4092,7 @@ describe('builtin popupmenu', function()
{n: gniht }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 2, false, 100 },
[4] = { -1, 'NW', 2, 1, 2, false, 100, 1, 1, 2 },
},
})
else
@@ -4176,7 +4176,7 @@ describe('builtin popupmenu', function()
{n: unplace }|
]],
float_pos = {
[4] = { -1, 'SW', 1, 19, 5, false, 250 },
[4] = { -1, 'SW', 1, 19, 5, false, 250, 2, 13, 5 },
},
})
else
@@ -4224,7 +4224,7 @@ describe('builtin popupmenu', function()
{s: }{n: eciohc }|
]],
float_pos = {
[5] = { -1, 'NW', 4, 1, -11, false, 100 },
[5] = { -1, 'NW', 4, 1, -11, false, 100, 1, 1, 9 },
},
}
else
@@ -4261,7 +4261,7 @@ describe('builtin popupmenu', function()
{s: }{n: eciohc}|
]],
float_pos = {
[5] = { -1, 'NW', 4, 2, 4, false, 100 },
[5] = { -1, 'NW', 4, 2, 4, false, 100, 1, 2, 24 },
},
}
else
@@ -4328,7 +4328,7 @@ describe('builtin popupmenu', function()
{n:jump }{s: }|
]],
float_pos = {
[5] = { -1, 'SW', 1, 5, 0, false, 250 },
[5] = { -1, 'SW', 1, 5, 0, false, 250, 2, 3, 0 },
},
}
else
@@ -5061,7 +5061,7 @@ describe('builtin popupmenu', function()
{n: unplace }|
]],
float_pos = {
[4] = { -1, 'SW', 1, 9, 5, false, 250 },
[4] = { -1, 'SW', 1, 9, 5, false, 250, 2, 3, 5 },
},
})
else
@@ -5423,7 +5423,7 @@ describe('builtin popupmenu', function()
{n: choice}{s: }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 24, false, 100 },
[4] = { -1, 'NW', 2, 1, 24, false, 100, 1, 1, 24 },
},
}
else
@@ -5462,7 +5462,7 @@ describe('builtin popupmenu', function()
{n: thing }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 25, false, 100 },
[4] = { -1, 'NW', 2, 1, 25, false, 100, 1, 1, 25 },
},
}
else
@@ -5505,7 +5505,7 @@ describe('builtin popupmenu', function()
{s: 123456789_123456789_123456789_a }|
{n: 123456789_123456789_123456789_b }|
]],
float_pos = { [4] = { -1, 'NW', 2, 3, 11, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 3, 11, false, 100, 1, 3, 11 } },
})
else
screen:expect([[
@@ -5539,7 +5539,7 @@ describe('builtin popupmenu', function()
{s: 1234567...}|
{n: 1234567...}|
]],
float_pos = { [4] = { -1, 'NW', 2, 3, 11, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 3, 11, false, 100, 1, 3, 11 } },
})
else
screen:expect([[
@@ -5573,7 +5573,7 @@ describe('builtin popupmenu', function()
{s: 123456789_1234567...}|
{n: 123456789_1234567...}|
]],
float_pos = { [4] = { -1, 'NW', 2, 3, 11, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 3, 11, false, 100, 1, 3, 11 } },
})
else
screen:expect([[
@@ -5607,7 +5607,7 @@ describe('builtin popupmenu', function()
{s: 12345...}|
{n: 12345...}|
]],
float_pos = { [4] = { -1, 'NW', 2, 3, 11, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 3, 11, false, 100, 1, 3, 11 } },
})
else
screen:expect([[
@@ -5642,7 +5642,7 @@ describe('builtin popupmenu', function()
{s: 12345...}|
{n: 12345...}|
]],
float_pos = { [4] = { -1, 'NW', 2, 4, 11, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 4, 11, false, 100, 1, 4, 11 } },
})
else
screen:expect([[
@@ -5695,7 +5695,7 @@ describe('builtin popupmenu', function()
{n:abcdefghij }|
{n:上下左右 }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 } },
})
else
screen:expect([[
@@ -5729,7 +5729,7 @@ describe('builtin popupmenu', function()
{n:abcdefghij}|
{n:上下左右 }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 } },
})
else
screen:expect([[
@@ -5763,7 +5763,7 @@ describe('builtin popupmenu', function()
{n:jihgfedcba}|
{n: 右左下上}|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 50, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 50, false, 100, 1, 1, 50 } },
})
else
screen:expect([[
@@ -5798,7 +5798,7 @@ describe('builtin popupmenu', function()
{n:ab}|
{n:上}|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 } },
})
else
screen:expect([[
@@ -5847,7 +5847,7 @@ describe('builtin popupmenu', function()
{n:bar barKind...}|
{n:baz bazKind...}|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 } },
})
else
screen:expect([[
@@ -5879,7 +5879,7 @@ describe('builtin popupmenu', function()
{n:...dniKrab rab}|
{n:...dniKzab zab}|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 18, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 18, false, 100, 1, 1, 18 } },
})
else
screen:expect([[
@@ -5912,7 +5912,7 @@ describe('builtin popupmenu', function()
{n:bar barKin...}|
{n:baz bazKin...}|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 } },
})
else
screen:expect([[
@@ -5944,7 +5944,7 @@ describe('builtin popupmenu', function()
{n:...niKrab rab}|
{n:...niKzab zab}|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 19, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 19, false, 100, 1, 1, 19 } },
})
else
screen:expect([[
@@ -5996,7 +5996,7 @@ describe('builtin popupmenu', function()
## grid 4
{n: 一二三四五六七八九>}|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 12, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 12, false, 100, 1, 1, 12 } },
})
else
screen:expect([[
@@ -6023,7 +6023,7 @@ describe('builtin popupmenu', function()
## grid 4
{n: 一二三 四五六 七八>}|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 12, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 12, false, 100, 1, 1, 12 } },
})
else
screen:expect([[
@@ -6051,7 +6051,7 @@ describe('builtin popupmenu', function()
## grid 4
{n:<九八七六五四三二一 }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 } },
})
else
screen:expect([[
@@ -6078,7 +6078,7 @@ describe('builtin popupmenu', function()
## grid 4
{n:<八七 六五四 三二一 }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 } },
})
else
screen:expect([[
@@ -6130,7 +6130,7 @@ describe('builtin popupmenu', function()
{n: 一二三四五六七八九>}{c: }|*2
{n: 一二三四五六七八九>}{s: }|*2
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 11, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 11, false, 100, 1, 1, 11 } },
})
else
screen:expect([[
@@ -6159,7 +6159,7 @@ describe('builtin popupmenu', function()
{n: abcdef ghijkl mnopq}{c: }|*2
{n: 一二三 四五六 七八>}{s: }|*2
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 11, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 11, false, 100, 1, 1, 11 } },
})
else
screen:expect([[
@@ -6189,7 +6189,7 @@ describe('builtin popupmenu', function()
{c: }{n:<九八七六五四三二一 }|*2
{s: }{n:<九八七六五四三二一 }|*2
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 } },
})
else
screen:expect([[
@@ -6218,7 +6218,7 @@ describe('builtin popupmenu', function()
{c: }{n:qponm lkjihg fedcba }|*2
{s: }{n:<八七 六五四 三二一 }|*2
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 0, false, 100, 1, 1, 0 } },
})
else
screen:expect([[
@@ -6263,7 +6263,7 @@ describe('builtin popupmenu', function()
{n: bar }|
{n: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250, 2, 1, 3 } },
})
else
feed('<RightMouse><4,0>')
@@ -6293,7 +6293,7 @@ describe('builtin popupmenu', function()
{n: bar }|
{n: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250, 2, 1, 3 } },
})
else
screen:expect([[
@@ -6322,7 +6322,7 @@ describe('builtin popupmenu', function()
{s: bar }|
{n: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250, 2, 1, 3 } },
})
else
screen:expect([[
@@ -6374,7 +6374,7 @@ describe('builtin popupmenu', function()
{n: bar }|
{n: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 3, 19, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 3, 19, false, 250, 2, 3, 19 } },
})
else
feed('<RightMouse><20,2>')
@@ -6403,7 +6403,7 @@ describe('builtin popupmenu', function()
{n: bar }|
{n: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 17, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 17, false, 250, 2, 1, 17 } },
}
else
feed('<RightMouse><18,0>')
@@ -6433,7 +6433,7 @@ describe('builtin popupmenu', function()
{n: bar }|
{n: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 3, 19, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 3, 19, false, 250, 2, 3, 19 } },
})
else
feed('<RightMouse><20,2>')
@@ -6486,7 +6486,7 @@ describe('builtin popupmenu', function()
{n: bar }|
{n: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250, 2, 1, 3 } },
})
else
feed('<RightMouse><4,0>')
@@ -6516,7 +6516,7 @@ describe('builtin popupmenu', function()
{n: bar }|
{s: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250, 2, 1, 3 } },
})
else
feed('<RightDrag><6,3>')
@@ -6571,7 +6571,7 @@ describe('builtin popupmenu', function()
{n: bar }|
{n: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250, 2, 1, 3 } },
})
else
feed('<RightMouse><4,0>')
@@ -6602,7 +6602,7 @@ describe('builtin popupmenu', function()
{n: bar }|
{n: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250, 2, 1, 3 } },
})
else
feed('<ScrollWheelUp><4,0>')
@@ -6633,7 +6633,7 @@ describe('builtin popupmenu', function()
{n: bar }|
{s: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250, 2, 1, 3 } },
})
else
feed('<MouseMove><6,3>')
@@ -6664,7 +6664,7 @@ describe('builtin popupmenu', function()
{s: bar }|
{n: baz }|
]],
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250 } },
float_pos = { [4] = { -1, 'NW', 2, 1, 3, false, 250, 2, 1, 3 } },
})
else
feed('<ScrollWheelDown><6,3>')
@@ -6726,7 +6726,7 @@ describe('builtin popupmenu', function()
^popup menu test |
{1:~ }|
]],
float_pos = { [4] = { -1, 'SW', 5, 1, 19, false, 250 } },
float_pos = { [4] = { -1, 'SW', 5, 1, 19, false, 250, 2, 1, 19 } },
})
else
feed('<RightMouse><20,4>')
@@ -6797,7 +6797,7 @@ describe('builtin popupmenu', function()
^popup menu test |
{1:~ }|
]],
float_pos = { [4] = { -1, 'SW', 6, 1, 12, false, 250 } },
float_pos = { [4] = { -1, 'SW', 6, 1, 12, false, 250, 2, 1, 28 } },
})
else
feed('<RightMouse><30,4>')
@@ -6871,7 +6871,7 @@ describe('builtin popupmenu', function()
{2:WINBAR }|
^popup menu test |
]],
float_pos = { [4] = { -1, 'SW', 6, 1, 12, false, 250 } },
float_pos = { [4] = { -1, 'SW', 6, 1, 12, false, 250, 2, 1, 28 } },
})
else
feed('<RightMouse><30,4>')
@@ -6948,7 +6948,7 @@ describe('builtin popupmenu', function()
{2:WINBAR }|
^popup menu test |
]],
float_pos = { [4] = { -1, 'NW', 1, 1, 19, false, 250 } },
float_pos = { [4] = { -1, 'NW', 1, 1, 19, false, 250, 2, 1, 19 } },
}
else
no_sel_screen = {
@@ -7050,7 +7050,7 @@ describe('builtin popupmenu', function()
{2:WINBAR }|
popup menu test |
]],
float_pos = { [4] = { -1, 'NW', 1, 1, 17, false, 250 } },
float_pos = { [4] = { -1, 'NW', 1, 1, 17, false, 250, 2, 1, 17 } },
}
else
no_sel_screen = {
@@ -7288,7 +7288,7 @@ describe('builtin popupmenu', function()
{n: Select All }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 33, false, 250 },
[4] = { -1, 'NW', 2, 1, 33, false, 250, 2, 1, 33 },
},
})
else
@@ -7337,7 +7337,7 @@ describe('builtin popupmenu', function()
{n: llA tceleS }|
]],
float_pos = {
[4] = { -1, 'NW', 2, 1, 0, false, 250 },
[4] = { -1, 'NW', 2, 1, 0, false, 250, 2, 1, 0 },
},
})
else

View File

@@ -953,11 +953,13 @@ function Screen:_handle_grid_resize(grid, width, height)
}
end
function Screen:_handle_msg_set_pos(grid, row, scrolled, char)
function Screen:_handle_msg_set_pos(grid, row, scrolled, char, zindex, compindex)
self.msg_grid = grid
self.msg_grid_pos = row
self.msg_scrolled = scrolled
self.msg_sep_char = char
self.msg_zindex = zindex
self.msg_compindex = compindex
end
function Screen:_handle_flush() end