Repository: neovim/neovim
File: test/functional/ui/float_spec.lua (Lua)

Code before:
            left = 0,
            right = 0,
            top = 0,
            win = 1000
          },
          [4] = {
            bottom = 0,
            left = 0,
            right = 0,
            top = 0,
            win = 1001
          }
        }
        })
      else
        screen:expect({
          grid = [[
                                                    |
            {0:~                                       }|*5
            :^                                       |
          ]]
        })
      end
      feed('<ESC>')

      -- show cursor after switch to a normal window
      api.nvim_set_current_win(cwin)
      if multigrid then
        screen:expect({
          grid = [[
          ## grid 1
            [2:----------------------------------------]|*6
            [3:----------------------------------------]|
          ## grid 2
            ^                                        |
            {0:~                                       }|*5
          ## grid 3
                                                    |
          ## grid 4 (hidden)
            {1:          }|
            {2:~         }|
          ]], win_viewport={
          [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
          [4] = {win = 1001, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
        }, win_viewport_margins={
          [2] = {
            bottom = 0,
            left = 0,
            right = 0,
            top = 0,
            win = 1000

Review comment (suggestion):
```suggestion
      -- Show cursor after switching to a normal window (hide=false).
```

Code after:
          {1:cd  }|
          {2:~   }|
        ]], float_pos={
          [4] = {1001, "NW", 1, 1, 1, true, 50, 1, 1, 1};
        }, win_viewport={
          [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
          [4] = {win = 1001, topline = 0, botline = 3, curline = 1, curcol = 1, linecount = 2, sum_scroll_delta = 0};
        }}
      else
        screen:expect{grid=[[
                                                  |
          {0:~}{1:ab  }{0:                                   }|
          {0:~}{1:cd  }{0:                                   }|
          {0:~}{2:~   }{0:                                   }|
          {0:~                                       }|*2
          :sleep 100^                              |
        ]]}
      end

      feed('<CR>')
      if multigrid then
        screen:expect{grid=[[
        ## grid 1
          [2:----------------------------------------]|*6
          [3:----------------------------------------]|
        ## grid 2
                                                  |
          {0:~                                       }|*5
        ## grid 3
          :sleep 100                              |
        ## grid 4
          {1:ab  }|
          {1:c^d  }|
          {2:~   }|
        ]], float_pos={
          [4] = {1001, "NW", 1, 1, 1, true, 50, 1, 1, 1};
        }, win_viewport={
          [2] = {win = 1000, topline = 0, botline = 2, curline = 0, curcol = 0, linecount = 1, sum_scroll_delta = 0};
          [4] = {win = 1001, topline = 0, botline = 3, curline = 1, curcol = 1, linecount = 2, sum_scroll_delta = 0};
        }}
      else
        screen:expect{grid=[[
                                                  |
          {0:~}{1:ab  }{0:                                   }|
          {0:~}{1:c^d  }{0:                                   }|
          {0:~}{2:~   }{0:                                   }|
          {0:~                                       }|*2
          :sleep 100                              |
        ]]}
      end
      feed('<C-C>')