refactor: "expose" `ui.open()` function
refactor: "expose" `ui.open()` function

This is still a private function and I won't be adding it to the docs as
officially supported API, but I want to provide this as a temporary
workaround for the problem reported here:

    https://github.com/wincent/command-t/issues/393#issuecomment-1229180445

In short, the:

    https://github.com/jiangmiao/auto-pairs

has a bug in it because it hasn't been touched since February 2019, and
it wasn't written to account for the fact that Neovim mappings can now
map to Lua callbacks instead of Vimscript strings (ie. via the
`vim.keymap.set()` call). So, it has some code that does this:

    let info = maparg('<CR>', 'i', 0, 1)
    if empty(info)
      let old_cr = '<CR>'
      let is_expr = 0
    else
      let old_cr = info['rhs']
      " ... etc

It sees our `<CR>` mapping and dies because it assumes that the returned
`info` has a `'rhs'` key, but it doesn't:

    E716: Key not present in Dictionary: "rhs"

This commit, then, allows us to make a workaround by replacing the Lua
callback with a string-based mapping which _will_ have a RHS:

    require('wincent.commandt').setup({
      mappings = {
        i = {
          ['<CR>'] = "<C-o>:lua require('wincent.commandt.private.ui').open('edit')<CR>",
        },
      },
    })

ie. we replace the standard mapping, which maps to the internal `open()`
callback, with one that imperatively reaches in from the outside and
calls it as seen above.

Like I said, I won't be making this an official API, but I did want to
provide a workaround, seeing as it may be a while before auto-pairs gets
updated.

wincent/command-t,wincent/command-t,wincent/command-t