mirror of
				https://github.com/jesseduffield/lazygit.git
				synced 2025-10-30 23:57:43 +02:00 
			
		
		
		
	set tag index directly
We can do this since they are already sorted by date created.
This commit is contained in:
		
				
					committed by
					
						 Jesse Duffield
						Jesse Duffield
					
				
			
			
				
	
			
			
			
						parent
						
							b8735cc609
						
					
				
				
					commit
					8c8b925b3a
				
			| @@ -607,18 +607,8 @@ func (gui *Gui) createTagMenu(commitSha string) error { | ||||
| } | ||||
|  | ||||
| func (gui *Gui) afterTagCreate(tagName string) error { | ||||
| 	return gui.refreshSidePanels(refreshOptions{mode: ASYNC, scope: []RefreshableView{COMMITS, TAGS}, then: func() { | ||||
| 		// find the index of the tag and set that as the currently selected line | ||||
| 		for i, tag := range gui.State.Tags { | ||||
| 			if tag.Name == tagName { | ||||
| 				gui.State.Panels.Tags.SelectedLineIdx = i | ||||
| 				if err := gui.State.Contexts.Tags.HandleRender(); err != nil { | ||||
| 					gui.Log.Error(err) | ||||
| 				} | ||||
| 				return | ||||
| 			} | ||||
| 		} | ||||
| 	}}) | ||||
| 	gui.State.Panels.Tags.SelectedLineIdx = 0 // Set to the top | ||||
| 	return gui.refreshSidePanels(refreshOptions{mode: ASYNC, scope: []RefreshableView{COMMITS, TAGS}}) | ||||
| } | ||||
|  | ||||
| func (gui *Gui) handleCreateAnnotatedTag(commitSha string) error { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user