Side-by-side semantic diff tool with theme support and hookable integration
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: scroll to first change on startup

+10
+10
main.go
··· 62 62 63 63 mtimes := [2]time.Time{mtime(oldFile), mtime(newFile)} 64 64 65 + cursor := 0 66 + for i, l := range lines { 67 + if l.Kind != sdiff.KindEqual { 68 + cursor = i 69 + break 70 + } 71 + } 72 + 65 73 return model{ 66 74 oldFile: oldFile, 67 75 newFile: newFile, ··· 73 81 oldHL: oldHL, 74 82 newHL: newHL, 75 83 mtimes: mtimes, 84 + cursor: cursor, 76 85 }, nil 77 86 } 78 87 ··· 104 113 if m.height < 1 { 105 114 m.height = 1 106 115 } 116 + m.scrollToCursor() 107 117 case tea.KeyMsg: 108 118 m.message = "" 109 119 switch msg.String() {