mirror of
				https://github.com/jesseduffield/lazygit.git
				synced 2025-10-30 23:57:43 +02:00 
			
		
		
		
	Fix searching in the divergence (left/right) view
Searching in the "Divergence from upstream" view would select the wrong lines. The OnSearchSelect function gets passed a view index, and uses it to select a model line. In most views these are the same, but not in the divergence view (because of the Remote/Local section headers).
This commit is contained in:
		| @@ -102,7 +102,7 @@ func (self *ListContextTrait) HandleRender() error { | ||||
| } | ||||
|  | ||||
| func (self *ListContextTrait) OnSearchSelect(selectedLineIdx int) error { | ||||
| 	self.GetList().SetSelection(selectedLineIdx) | ||||
| 	self.GetList().SetSelection(self.ViewIndexToModelIndex(selectedLineIdx)) | ||||
| 	return self.HandleFocus(types.OnFocusOpts{}) | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user