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

Code before:
          ]],
          win_pos = { [2] = { height = 8, startcol = 0, startrow = 0, width = 50, win = 1000 } },
          float_pos = { [4] = { 1001, 'NW', 1, 2, 5, true, 50, 1, 2, 5 } },
          win_viewport = {
            [2] = { win = 1000, topline = 3, botline = 11, curline = 9, curcol = 0, linecount = 11, sum_scroll_delta = 3 },
            [4] = { win = 1001, topline = 2, botline = 4, curline = 2, curcol = 7, linecount = 3, sum_scroll_delta = 2 },
          },
          win_viewport_margins = {
            [2] = { bottom = 0, left = 0, right = 0, top = 0, win = 1000 },
            [4] = { bottom = 1, left = 1, right = 1, top = 1, win = 1001 },
          },
        })
      else
        screen:expect([[
          Ut enim ad minim veniam, quis nostrud             |
          exercitation ullamco laboris nisi ut aliquip ex   |
          ea co{26:┌}{27:Title}{26:──────────┐}Duis aute irure dolor in    |
          repre{26:│}{28:popup}{29:it i}{28:text}{26:lu│}tate velit esse cillum      |
          dolor{26:│}{30:~}{26:eu fugiat null│} pariatur. Excepteur sint   |
          occae{26:│}{30:~}{26:t cupidatat no│} proident, sunt in culpa    |
          {16:^qui o}{22:└}{25:Footer}{22:─────────┘}{16:ollit anim id est           }|
          laborum.                                          |
                                                            |
        ]])
      end
      -- issue: #14453
      command('fclose | hi TestUnderLine gui=underline')
      api.nvim_buf_add_highlight(curbuf, -1, 'TestUnderLine', 3, 0, -1)
      api.nvim_buf_add_highlight(curbuf, -1, 'TestUnderLine', 4, 0, -1)
      api.nvim_buf_set_lines(buf, 0, -1, false, {})
      api.nvim_open_win(buf, false, { relative = 'win', row = 0, col = 0, width = 50, height = 1 })
      if multigrid then
        screen:expect({
          grid = [[
          ## grid 1
            [2:--------------------------------------------------]|*8
            [3:--------------------------------------------------]|
          ## grid 2
            {34:Ut enim ad minim veniam, quis nostrud}             |
            {34:exercitation ullamco laboris nisi ut aliquip ex}   |
            ea commodo consequat. Duis aute irure dolor in    |
            reprehenderit in voluptate velit esse cillum      |
            dolore eu fugiat nulla pariatur. Excepteur sint   |
            occaecat cupidatat non proident, sunt in culpa    |
            {16:^qui officia deserunt mollit anim id est           }|
            laborum.                                          |
          ## grid 3
                                                              |
          ## grid 5
            {17:                                                  }|
          ]],

Review comment (suggestion):
I see that nvim_open_win() is doing something unusual, so I guess this test can't be combined with one of the existing tests above.

A brief description will help (and a blank line for navigation):

```suggestion

      -- winblend highlight with underline (but without guisp) in a floatwin. #14453
```

Code after:
          ]],
          win_pos = { [2] = { height = 8, startcol = 0, startrow = 0, width = 50, win = 1000 } },
          float_pos = { [4] = { 1001, 'NW', 1, 2, 5, true, 50, 1, 2, 5 } },
          win_viewport = {
            [2] = { win = 1000, topline = 3, botline = 11, curline = 9, curcol = 0, linecount = 11, sum_scroll_delta = 3 },
            [4] = { win = 1001, topline = 2, botline = 4, curline = 2, curcol = 7, linecount = 3, sum_scroll_delta = 2 },
          },
          win_viewport_margins = {
            [2] = { bottom = 0, left = 0, right = 0, top = 0, win = 1000 },
            [4] = { bottom = 1, left = 1, right = 1, top = 1, win = 1001 },
          },
        })
      else
        screen:expect([[
          Ut enim ad minim veniam, quis nostrud             |
          exercitation ullamco laboris nisi ut aliquip ex   |
          ea co{26:┌}{27:Title}{26:──────────┐}Duis aute irure dolor in    |
          repre{26:│}{28:popup}{29:it i}{28:text}{26:lu│}tate velit esse cillum      |
          dolor{26:│}{30:~}{26:eu fugiat null│} pariatur. Excepteur sint   |
          occae{26:│}{30:~}{26:t cupidatat no│} proident, sunt in culpa    |
          {16:^qui o}{22:└}{25:Footer}{22:─────────┘}{16:ollit anim id est           }|
          laborum.                                          |
                                                            |
        ]])
      end

      -- winblend highlight with underline (but without guisp) in a floatwin. #14453
      command('fclose | hi TestUnderLine gui=underline')
      api.nvim_buf_add_highlight(curbufnr, -1, 'TestUnderLine', 3, 0, -1)
      api.nvim_buf_add_highlight(curbufnr, -1, 'TestUnderLine', 4, 0, -1)
      api.nvim_buf_set_lines(buf, 0, -1, false, {})
      api.nvim_open_win(buf, false, { relative = 'win', row = 0, col = 0, width = 50, height = 1 })
      if multigrid then
        screen:expect({
          grid = [[
          ## grid 1
            [2:--------------------------------------------------]|*8
            [3:--------------------------------------------------]|
          ## grid 2
            {34:Ut enim ad minim veniam, quis nostrud}             |
            {34:exercitation ullamco laboris nisi ut aliquip ex}   |
            ea commodo consequat. Duis aute irure dolor in    |
            reprehenderit in voluptate velit esse cillum      |
            dolore eu fugiat nulla pariatur. Excepteur sint   |
            occaecat cupidatat non proident, sunt in culpa    |
            {16:^qui officia deserunt mollit anim id est           }|
            laborum.                                          |
          ## grid 3
                                                              |
          ## grid 5
            {17:                                                  }|