mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:12:44 +00:00 
			
		
		
		
	HackStudio: Migrate git-diff indicators to TextEditor API
As part of this, the CodeDocument now keeps track of the kind of difference for each line. Previously, we iterated every hunk every time the editor was painted, but now we do that once whenever the diff changes, and then save the type of difference for each line.
This commit is contained in:
		
							parent
							
								
									620bf45f43
								
							
						
					
					
						commit
						0761926127
					
				
					 5 changed files with 84 additions and 31 deletions
				
			
		|  | @ -87,8 +87,10 @@ void EditorWrapper::save() | |||
| 
 | ||||
| void EditorWrapper::update_diff() | ||||
| { | ||||
|     if (m_git_repo) | ||||
|     if (m_git_repo) { | ||||
|         m_hunks = Diff::parse_hunks(m_git_repo->unstaged_diff(filename()).value()); | ||||
|         editor().update_git_diff_indicators().release_value_but_fixme_should_propagate_errors(); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void EditorWrapper::set_project_root(DeprecatedString const& project_root) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Sam Atkins
						Sam Atkins