mirror of
https://github.com/neovim/neovim.git
synced 2025-10-14 05:46:12 +00:00
feat(ui): use builtin completion popupmenu with ext_cmdline (#31269)
Problem: UIs implementing ext_cmdline/message must also implement ext_popupmenu in order to get cmdline completion with wildoptions+=pum. Solution: Allow marking a window as the ext_cmdline window through nvim_open_win(), including prompt offset. Anchor the cmdline- completion popupmenu to this window.
This commit is contained in:
@@ -3008,10 +3008,9 @@ static int cmd_startcol(void)
|
||||
int cmd_screencol(int bytepos)
|
||||
{
|
||||
int m; // maximum column
|
||||
|
||||
int col = cmd_startcol();
|
||||
if (KeyTyped) {
|
||||
m = Columns * Rows;
|
||||
m = cmdline_win ? cmdline_win->w_view_width * cmdline_win->w_view_height : Columns * Rows;
|
||||
if (m < 0) { // overflow, Columns or Rows at weird value
|
||||
m = MAXCOL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user