fix: correct minor typo in sidebar.lua (#172)
This commit is contained in:
		
							parent
							
								
									a3c2a9a0d5
								
							
						
					
					
						commit
						7d4be712f0
					
				@ -123,7 +123,7 @@ local E = {}
 | 
				
			|||||||
---@private
 | 
					---@private
 | 
				
			||||||
E._once = false
 | 
					E._once = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
--- intialize the environment variable for current neovim session.
 | 
					--- initialize the environment variable for current neovim session.
 | 
				
			||||||
--- This will only run once and spawn a UI for users to input the envvar.
 | 
					--- This will only run once and spawn a UI for users to input the envvar.
 | 
				
			||||||
---@param opts {refresh: boolean, provider: AvanteProviderFunctor}
 | 
					---@param opts {refresh: boolean, provider: AvanteProviderFunctor}
 | 
				
			||||||
---@private
 | 
					---@private
 | 
				
			||||||
 | 
				
			|||||||
@ -81,13 +81,13 @@ function Sidebar:open()
 | 
				
			|||||||
  local in_visual_mode = Utils.in_visual_mode() and self:in_code_win()
 | 
					  local in_visual_mode = Utils.in_visual_mode() and self:in_code_win()
 | 
				
			||||||
  if not self:is_open() then
 | 
					  if not self:is_open() then
 | 
				
			||||||
    self:reset()
 | 
					    self:reset()
 | 
				
			||||||
    self:intialize()
 | 
					    self:initialize()
 | 
				
			||||||
    self:render()
 | 
					    self:render()
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
    if in_visual_mode then
 | 
					    if in_visual_mode then
 | 
				
			||||||
      self:close()
 | 
					      self:close()
 | 
				
			||||||
      self:reset()
 | 
					      self:reset()
 | 
				
			||||||
      self:intialize()
 | 
					      self:initialize()
 | 
				
			||||||
      self:render()
 | 
					      self:render()
 | 
				
			||||||
      return self
 | 
					      return self
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
@ -878,7 +878,7 @@ end
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
--- Initialize the sidebar instance.
 | 
					--- Initialize the sidebar instance.
 | 
				
			||||||
--- @return avante.Sidebar The Sidebar instance.
 | 
					--- @return avante.Sidebar The Sidebar instance.
 | 
				
			||||||
function Sidebar:intialize()
 | 
					function Sidebar:initialize()
 | 
				
			||||||
  self.code.winid = api.nvim_get_current_win()
 | 
					  self.code.winid = api.nvim_get_current_win()
 | 
				
			||||||
  self.code.bufnr = api.nvim_get_current_buf()
 | 
					  self.code.bufnr = api.nvim_get_current_buf()
 | 
				
			||||||
  self.code.selection = Utils.get_visual_selection_and_range()
 | 
					  self.code.selection = Utils.get_visual_selection_and_range()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user