mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	api: nvim_win_open() style="minimal" should disable 'foldcolumn'
This commit is contained in:
		@@ -1071,10 +1071,10 @@ fail:
 | 
			
		||||
///                    disabled. This is useful when displaing a temporary
 | 
			
		||||
///                    float where the text should not be edited. Disables
 | 
			
		||||
///                    'number', 'relativenumber', 'cursorline', 'cursorcolumn',
 | 
			
		||||
///                    'spell' and 'list' options. 'signcolumn' is changed to
 | 
			
		||||
///                    `auto`. The end-of-buffer region is hidden by setting
 | 
			
		||||
///                    `eob` flag of 'fillchars' to a space char, and clearing
 | 
			
		||||
///                    the |EndOfBuffer| region in 'winhighlight'.
 | 
			
		||||
///                    'foldcolumn', 'spell' and 'list' options. 'signcolumn'
 | 
			
		||||
///                    is changed to `auto`. The end-of-buffer region is hidden
 | 
			
		||||
///                    by setting `eob` flag of 'fillchars' to a space char,
 | 
			
		||||
///                    and clearing the |EndOfBuffer| region in 'winhighlight'.
 | 
			
		||||
///
 | 
			
		||||
///       top-level window. Currently accepts no other positioning
 | 
			
		||||
///       configuration together with this.
 | 
			
		||||
 
 | 
			
		||||
@@ -598,6 +598,7 @@ void win_set_minimal_style(win_T *wp)
 | 
			
		||||
  wp->w_p_cuc = false;
 | 
			
		||||
  wp->w_p_spell = false;
 | 
			
		||||
  wp->w_p_list = false;
 | 
			
		||||
  wp->w_p_fdc = 0;
 | 
			
		||||
 | 
			
		||||
  // Hide EOB region: use " " fillchar and cleared highlighting
 | 
			
		||||
  if (wp->w_p_fcs_chars.eob != ' ') {
 | 
			
		||||
@@ -615,6 +616,7 @@ void win_set_minimal_style(win_T *wp)
 | 
			
		||||
    xfree(old);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  // signcolumn: use 'auto'
 | 
			
		||||
  if (wp->w_p_scl[0] != 'a') {
 | 
			
		||||
    xfree(wp->w_p_scl);
 | 
			
		||||
    wp->w_p_scl = (char_u *)xstrdup("auto");
 | 
			
		||||
 
 | 
			
		||||
@@ -383,6 +383,7 @@ describe('floating windows', function()
 | 
			
		||||
      command('set number')
 | 
			
		||||
      command('set signcolumn=yes')
 | 
			
		||||
      command('set cursorline')
 | 
			
		||||
      command('set foldcolumn=1')
 | 
			
		||||
      command('hi NormalFloat guibg=#333333')
 | 
			
		||||
      feed('ix<cr>y<cr><esc>gg')
 | 
			
		||||
      local win = meths.open_win(0, false, {relative='editor', width=20, height=4, row=4, col=10, style='minimal'})
 | 
			
		||||
@@ -410,7 +411,7 @@ describe('floating windows', function()
 | 
			
		||||
          {15:                    }|
 | 
			
		||||
        ]], float_pos={[3] = {{id = 1001}, "NW", 1, 4, 10, true}}}
 | 
			
		||||
      else
 | 
			
		||||
        screen:expect([[
 | 
			
		||||
        screen:expect{grid=[[
 | 
			
		||||
          {19:   }{20:  1 }{21:^x                                }|
 | 
			
		||||
          {19:   }{14:  2 }y                                |
 | 
			
		||||
          {19:   }{14:  3 }   {15:x                   }          |
 | 
			
		||||
@@ -418,7 +419,7 @@ describe('floating windows', function()
 | 
			
		||||
          {0:~         }{15:                    }{0:          }|
 | 
			
		||||
          {0:~         }{15:                    }{0:          }|
 | 
			
		||||
                                                  |
 | 
			
		||||
        ]])
 | 
			
		||||
        ]]}
 | 
			
		||||
      end
 | 
			
		||||
 | 
			
		||||
      --  signcolumn=yes still works if there actually are signs
 | 
			
		||||
@@ -435,7 +436,7 @@ describe('floating windows', function()
 | 
			
		||||
          [2:----------------------------------------]|
 | 
			
		||||
                                                  |
 | 
			
		||||
        ## grid 2
 | 
			
		||||
          {17:𐌢̀́̂̃̅̄𐌢̀́̂̃̅̄}{20:  1 }{21:^x                                 }|
 | 
			
		||||
          {19: }{17:𐌢̀́̂̃̅̄𐌢̀́̂̃̅̄}{20:  1 }{21:^x                                }|
 | 
			
		||||
          {19:   }{14:  2 }y                                |
 | 
			
		||||
          {19:   }{14:  3 }                                 |
 | 
			
		||||
          {0:~                                       }|
 | 
			
		||||
@@ -450,7 +451,7 @@ describe('floating windows', function()
 | 
			
		||||
 | 
			
		||||
      else
 | 
			
		||||
        screen:expect([[
 | 
			
		||||
          {17:𐌢̀́̂̃̅̄𐌢̀́̂̃̅̄}{20:  1 }{21:^x                                 }|
 | 
			
		||||
          {19: }{17:𐌢̀́̂̃̅̄𐌢̀́̂̃̅̄}{20:  1 }{21:^x                                }|
 | 
			
		||||
          {19:   }{14:  2 }y                                |
 | 
			
		||||
          {19:   }{14:  3 }   {17:𐌢̀́̂̃̅̄𐌢̀́̂̃̅̄}{15:x                 }          |
 | 
			
		||||
          {0:~         }{19:  }{15:y                 }{0:          }|
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user