Merge branch 'main' into spinner-improvements

Raphael Amorim created

Change summary

cmd/root.go                                                                                      |   1 
cspell.json                                                                                      |   2 
go.mod                                                                                           |   5 
go.sum                                                                                           |   8 
internal/db/db.go                                                                                |  10 
internal/db/files.sql.go                                                                         |  45 
internal/db/migrations/20250424200609_initial.sql                                                |   2 
internal/db/models.go                                                                            |   2 
internal/db/querier.go                                                                           |   1 
internal/db/sql/files.sql                                                                        |  21 
internal/exp/diffview/Taskfile.yaml                                                              | 102 
internal/exp/diffview/chroma.go                                                                  |  52 
internal/exp/diffview/diffview.go                                                                | 681 
internal/exp/diffview/diffview_test.go                                                           | 300 
internal/exp/diffview/split.go                                                                   |  74 
internal/exp/diffview/style.go                                                                   | 124 
internal/exp/diffview/testdata/TestDefault.after                                                 |  10 
internal/exp/diffview/testdata/TestDefault.before                                                |   9 
internal/exp/diffview/testdata/TestDiffView/Split/CustomContextLines/DarkMode.golden             |  16 
internal/exp/diffview/testdata/TestDiffView/Split/CustomContextLines/LightMode.golden            |  13 
internal/exp/diffview/testdata/TestDiffView/Split/Default/DarkMode.golden                        |   7 
internal/exp/diffview/testdata/TestDiffView/Split/Default/LightMode.golden                       |   7 
internal/exp/diffview/testdata/TestDiffView/Split/LargeWidth/DarkMode.golden                     |  15 
internal/exp/diffview/testdata/TestDiffView/Split/LargeWidth/LightMode.golden                    |  12 
internal/exp/diffview/testdata/TestDiffView/Split/MultipleHunks/DarkMode.golden                  |  15 
internal/exp/diffview/testdata/TestDiffView/Split/MultipleHunks/LightMode.golden                 |  12 
internal/exp/diffview/testdata/TestDiffView/Split/Narrow/DarkMode.golden                         |   4 
internal/exp/diffview/testdata/TestDiffView/Split/Narrow/LightMode.golden                        |   4 
internal/exp/diffview/testdata/TestDiffView/Split/NoLineNumbers/DarkMode.golden                  |   7 
internal/exp/diffview/testdata/TestDiffView/Split/NoLineNumbers/LightMode.golden                 |   7 
internal/exp/diffview/testdata/TestDiffView/Split/NoSyntaxHighlight/DarkMode.golden              |  15 
internal/exp/diffview/testdata/TestDiffView/Split/NoSyntaxHighlight/LightMode.golden             |  15 
internal/exp/diffview/testdata/TestDiffView/Split/SmallWidth/DarkMode.golden                     |  15 
internal/exp/diffview/testdata/TestDiffView/Split/SmallWidth/LightMode.golden                    |  15 
internal/exp/diffview/testdata/TestDiffView/Unified/CustomContextLines/DarkMode.golden           |  17 
internal/exp/diffview/testdata/TestDiffView/Unified/CustomContextLines/LightMode.golden          |  17 
internal/exp/diffview/testdata/TestDiffView/Unified/Default/DarkMode.golden                      |   8 
internal/exp/diffview/testdata/TestDiffView/Unified/Default/LightMode.golden                     |   8 
internal/exp/diffview/testdata/TestDiffView/Unified/LargeWidth/DarkMode.golden                   |  16 
internal/exp/diffview/testdata/TestDiffView/Unified/LargeWidth/LightMode.golden                  |  16 
internal/exp/diffview/testdata/TestDiffView/Unified/MultipleHunks/DarkMode.golden                |  16 
internal/exp/diffview/testdata/TestDiffView/Unified/MultipleHunks/LightMode.golden               |  16 
internal/exp/diffview/testdata/TestDiffView/Unified/Narrow/DarkMode.golden                       |   7 
internal/exp/diffview/testdata/TestDiffView/Unified/Narrow/LightMode.golden                      |   7 
internal/exp/diffview/testdata/TestDiffView/Unified/NoLineNumbers/DarkMode.golden                |   8 
internal/exp/diffview/testdata/TestDiffView/Unified/NoLineNumbers/LightMode.golden               |   8 
internal/exp/diffview/testdata/TestDiffView/Unified/NoSyntaxHighlight/DarkMode.golden            |  16 
internal/exp/diffview/testdata/TestDiffView/Unified/NoSyntaxHighlight/LightMode.golden           |  16 
internal/exp/diffview/testdata/TestDiffView/Unified/SmallWidth/DarkMode.golden                   |  16 
internal/exp/diffview/testdata/TestDiffView/Unified/SmallWidth/LightMode.golden                  |  16 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf001.golden                       |   1 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf002.golden                       |   2 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf003.golden                       |   3 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf004.golden                       |   4 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf005.golden                       |   5 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf006.golden                       |   6 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf007.golden                       |   7 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf008.golden                       |   8 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf009.golden                       |   9 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf010.golden                       |  10 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf011.golden                       |  11 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf012.golden                       |  12 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf013.golden                       |  13 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf014.golden                       |  12 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf015.golden                       |  12 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf016.golden                       |  12 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf017.golden                       |  12 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf018.golden                       |  12 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf019.golden                       |  12 
internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf020.golden                       |  12 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf001.golden                     |   1 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf002.golden                     |   2 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf003.golden                     |   3 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf004.golden                     |   4 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf005.golden                     |   5 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf006.golden                     |   6 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf007.golden                     |   7 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf008.golden                     |   8 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf009.golden                     |   9 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf010.golden                     |  10 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf011.golden                     |  11 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf012.golden                     |  12 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf013.golden                     |  13 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf014.golden                     |  14 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf015.golden                     |  15 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf016.golden                     |  16 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf017.golden                     |  17 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf018.golden                     |  18 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf019.golden                     |  19 
internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf020.golden                     |  20 
internal/exp/diffview/testdata/TestDiffViewTabs/Split.golden                                     |  12 
internal/exp/diffview/testdata/TestDiffViewTabs/Unified.golden                                   |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf001.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf002.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf003.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf004.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf005.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf006.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf007.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf008.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf009.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf010.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf011.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf012.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf013.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf014.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf015.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf016.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf017.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf018.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf019.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf020.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf021.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf022.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf023.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf024.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf025.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf026.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf027.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf028.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf029.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf030.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf031.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf032.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf033.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf034.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf035.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf036.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf037.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf038.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf039.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf040.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf041.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf042.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf043.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf044.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf045.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf046.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf047.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf048.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf049.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf050.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf051.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf052.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf053.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf054.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf055.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf056.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf057.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf058.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf059.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf060.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf061.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf062.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf063.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf064.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf065.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf066.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf067.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf068.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf069.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf070.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf071.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf072.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf073.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf074.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf075.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf076.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf077.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf078.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf079.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf080.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf081.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf082.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf083.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf084.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf085.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf086.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf087.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf088.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf089.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf090.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf091.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf092.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf093.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf094.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf095.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf096.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf097.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf098.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf099.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf100.golden                         |  15 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf101.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf102.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf103.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf104.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf105.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf106.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf107.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf108.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf109.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf110.golden                         |  12 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf001.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf002.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf003.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf004.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf005.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf006.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf007.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf008.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf009.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf010.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf011.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf012.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf013.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf014.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf015.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf016.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf017.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf018.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf019.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf020.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf021.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf022.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf023.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf024.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf025.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf026.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf027.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf028.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf029.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf030.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf031.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf032.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf033.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf034.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf035.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf036.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf037.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf038.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf039.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf040.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf041.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf042.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf043.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf044.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf045.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf046.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf047.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf048.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf049.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf050.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf051.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf052.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf053.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf054.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf055.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf056.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf057.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf058.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf059.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf060.golden                       |  16 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf00.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf01.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf02.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf03.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf04.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf05.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf06.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf07.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf08.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf09.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf10.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf11.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf12.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf13.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf14.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf15.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf16.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf17.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf18.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf19.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf20.golden                      |   7 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf00.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf01.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf02.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf03.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf04.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf05.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf06.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf07.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf08.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf09.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf10.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf11.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf12.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf13.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf14.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf15.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf16.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf17.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf18.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf19.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf20.golden                    |   8 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf00.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf01.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf02.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf03.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf04.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf05.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf06.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf07.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf08.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf09.golden                      |   3 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf10.golden                      |   2 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf11.golden                      |   1 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf12.golden                      |   0 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf13.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf14.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf15.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf16.golden                      |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf00.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf01.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf02.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf03.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf04.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf05.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf06.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf07.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf08.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf09.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf10.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf11.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf12.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf13.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf14.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf15.golden                    |   5 
internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf16.golden                    |   5 
internal/exp/diffview/testdata/TestMultipleHunks.after                                           |  15 
internal/exp/diffview/testdata/TestMultipleHunks.before                                          |  13 
internal/exp/diffview/testdata/TestNarrow.after                                                  |   3 
internal/exp/diffview/testdata/TestNarrow.before                                                 |   3 
internal/exp/diffview/testdata/TestTabs.after                                                    |  15 
internal/exp/diffview/testdata/TestTabs.before                                                   |  13 
internal/exp/diffview/testdata/TestUdiff/ToUnifiedDiff/DefaultContextLines/Content.golden        |  11 
internal/exp/diffview/testdata/TestUdiff/ToUnifiedDiff/DefaultContextLines/JSON.golden           |  40 
internal/exp/diffview/testdata/TestUdiff/ToUnifiedDiff/DefaultContextLinesPlusOne/Content.golden |  12 
internal/exp/diffview/testdata/TestUdiff/ToUnifiedDiff/DefaultContextLinesPlusOne/JSON.golden    |  44 
internal/exp/diffview/testdata/TestUdiff/ToUnifiedDiff/DefaultContextLinesPlusTwo/Content.golden |  13 
internal/exp/diffview/testdata/TestUdiff/ToUnifiedDiff/DefaultContextLinesPlusTwo/JSON.golden    |  48 
internal/exp/diffview/testdata/TestUdiff/Unified.golden                                          |  11 
internal/exp/diffview/udiff_test.go                                                              |  92 
internal/exp/diffview/util.go                                                                    |  39 
internal/exp/diffview/util_test.go                                                               |  27 
internal/fsext/fileutil.go                                                                       |  26 
internal/fsext/ls.go                                                                             |   2 
internal/history/file.go                                                                         |  56 
internal/llm/agent/agent.go                                                                      |  21 
internal/llm/agent/tools.go                                                                      |   1 
internal/llm/tools/edit.go                                                                       |  54 
internal/llm/tools/fetch.go                                                                      |  64 
internal/llm/tools/glob.go                                                                       |   8 
internal/llm/tools/grep.go                                                                       |  25 
internal/llm/tools/ls.go                                                                         |   4 
internal/llm/tools/patch.go                                                                      | 372 
internal/llm/tools/shell/comparison_test.go                                                      |  30 
internal/llm/tools/shell/shell_test.go                                                           |  25 
internal/llm/tools/sourcegraph.go                                                                |  63 
internal/lsp/watcher/watcher.go                                                                  |  34 
internal/tui/components/chat/editor/editor.go                                                    |   4 
internal/tui/components/chat/messages/messages.go                                                |   2 
internal/tui/components/chat/messages/renderer.go                                                |  56 
internal/tui/components/chat/sidebar/sidebar.go                                                  | 313 
internal/tui/components/core/helpers.go                                                          |  38 
internal/tui/components/dialogs/commands/commands.go                                             |   3 
internal/tui/components/dialogs/init/init.go                                                     |   3 
internal/tui/components/dialogs/permissions/permissions.go                                       |  33 
internal/tui/page/chat/chat.go                                                                   |   2 
internal/tui/styles/crush.go                                                                     |   2 
internal/tui/styles/icons.go                                                                     |   5 
internal/version/version.go                                                                      |   2 
todos.md                                                                                         |  10 
382 files changed, 6,127 insertions(+), 797 deletions(-)

Detailed changes

cmd/root.go 🔗

@@ -256,6 +256,7 @@ func setupSubscriptions(app *app.App, parentCtx context.Context) (chan tea.Msg,
 	setupSubscriber(ctx, &wg, "messages", app.Messages.Subscribe, ch)
 	setupSubscriber(ctx, &wg, "permissions", app.Permissions.Subscribe, ch)
 	setupSubscriber(ctx, &wg, "coderAgent", app.CoderAgent.Subscribe, ch)
+	setupSubscriber(ctx, &wg, "history", app.History.Subscribe, ch)
 
 	cleanupFunc := func() {
 		logging.Info("Cancelling all subscriptions")

cspell.json 🔗

@@ -1 +1 @@
-{"flagWords":[],"language":"en","words":["crush","charmbracelet","lipgloss","bubbletea","textinput","Focusable","lsps","Sourcegraph","filepicker","imageorient","rasterx","oksvg","termenv","trashhalo","lucasb","nfnt","srwiley","Lanczos"],"version":"0.2"}
+{"version":"0.2","language":"en","flagWords":[],"words":["crush","charmbracelet","lipgloss","bubbletea","textinput","Focusable","lsps","Sourcegraph","filepicker","imageorient","rasterx","oksvg","termenv","trashhalo","lucasb","nfnt","srwiley","Lanczos","fsext"]}

go.mod 🔗

@@ -9,7 +9,7 @@ require (
 	github.com/PuerkitoBio/goquery v1.9.2
 	github.com/alecthomas/chroma/v2 v2.15.0
 	github.com/anthropics/anthropic-sdk-go v1.4.0
-	github.com/aymanbagabas/go-udiff v0.2.0
+	github.com/aymanbagabas/go-udiff v0.3.1
 	github.com/bmatcuk/doublestar/v4 v4.8.1
 	github.com/charlievieth/fastwalk v1.0.11
 	github.com/charmbracelet/bubbles/v2 v2.0.0-beta.1.0.20250607113720-eb5e1cf3b09e
@@ -18,6 +18,7 @@ require (
 	github.com/charmbracelet/lipgloss/v2 v2.0.0-beta.1.0.20250523195325-2d1af06b557c
 	github.com/charmbracelet/x/ansi v0.9.3-0.20250602153603-fb931ed90413
 	github.com/charmbracelet/x/exp/charmtone v0.0.0-20250530202730-6ba1785cd7b9
+	github.com/charmbracelet/x/exp/golden v0.0.0-20250207160936-21c02780d27a
 	github.com/disintegration/imageorient v0.0.0-20180920195336-8147d86e83ec
 	github.com/fsnotify/fsnotify v1.8.0
 	github.com/go-logfmt/logfmt v0.6.0
@@ -65,7 +66,7 @@ require (
 	github.com/aymerick/douceur v0.2.0 // indirect
 	github.com/charmbracelet/colorprofile v0.3.1 // indirect
 	github.com/charmbracelet/x/cellbuf v0.0.14-0.20250516160309-24eee56f89fa // indirect
-	github.com/charmbracelet/x/exp/slice v0.0.0-20250528180458-2d5d6cb84620
+	github.com/charmbracelet/x/exp/slice v0.0.0-20250611152503-f53cdd7e01ef
 	github.com/charmbracelet/x/input v0.3.5-0.20250509021451-13796e822d86 // indirect
 	github.com/charmbracelet/x/term v0.2.1 // indirect
 	github.com/charmbracelet/x/windows v0.2.1 // indirect

go.sum 🔗

@@ -60,8 +60,8 @@ github.com/aws/smithy-go v1.20.3 h1:ryHwveWzPV5BIof6fyDvor6V3iUL7nTfiTKXHiW05nE=
 github.com/aws/smithy-go v1.20.3/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
 github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k=
 github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8=
-github.com/aymanbagabas/go-udiff v0.2.0 h1:TK0fH4MteXUDspT88n8CKzvK0X9O2xu9yQjWpi6yML8=
-github.com/aymanbagabas/go-udiff v0.2.0/go.mod h1:RE4Ex0qsGkTAJoQdQQCA0uG+nAzJO/pI/QwceO5fgrA=
+github.com/aymanbagabas/go-udiff v0.3.1 h1:LV+qyBQ2pqe0u42ZsUEtPiCaUoqgA9gYRDs3vj1nolY=
+github.com/aymanbagabas/go-udiff v0.3.1/go.mod h1:G0fsKmG+P6ylD0r6N/KgQD/nWzgfnl8ZBcNLgcbrw8E=
 github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk=
 github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4=
 github.com/bmatcuk/doublestar/v4 v4.8.1 h1:54Bopc5c2cAvhLRAzqOGCYHYyhcDHsFF4wWIR5wKP38=
@@ -86,8 +86,8 @@ github.com/charmbracelet/x/exp/charmtone v0.0.0-20250530202730-6ba1785cd7b9 h1:f
 github.com/charmbracelet/x/exp/charmtone v0.0.0-20250530202730-6ba1785cd7b9/go.mod h1:vr+xCFylsPYq2qSz+n5/jItjcK2/PgrKFMTI7VRR6CI=
 github.com/charmbracelet/x/exp/golden v0.0.0-20250207160936-21c02780d27a h1:FsHEJ52OC4VuTzU8t+n5frMjLvpYWEznSr/u8tnkCYw=
 github.com/charmbracelet/x/exp/golden v0.0.0-20250207160936-21c02780d27a/go.mod h1:wDlXFlCrmJ8J+swcL/MnGUuYnqgQdW9rhSD61oNMb6U=
-github.com/charmbracelet/x/exp/slice v0.0.0-20250528180458-2d5d6cb84620 h1:/PN4jqP3ki9NvtHRrYZ9ewCutKZB6DK8frTW+Dj/MWs=
-github.com/charmbracelet/x/exp/slice v0.0.0-20250528180458-2d5d6cb84620/go.mod h1:vI5nDVMWi6veaYH+0Fmvpbe/+cv/iJfMntdh+N0+Tms=
+github.com/charmbracelet/x/exp/slice v0.0.0-20250611152503-f53cdd7e01ef h1:v7qwsZ2OxzlwvpKwz8dtZXp7fIJlcDEUOyFBNE4fz4Q=
+github.com/charmbracelet/x/exp/slice v0.0.0-20250611152503-f53cdd7e01ef/go.mod h1:vI5nDVMWi6veaYH+0Fmvpbe/+cv/iJfMntdh+N0+Tms=
 github.com/charmbracelet/x/input v0.3.5-0.20250509021451-13796e822d86 h1:BxAEmOBIDajkgao3EsbBxKQCYvgYPGdT62WASLvtf4Y=
 github.com/charmbracelet/x/input v0.3.5-0.20250509021451-13796e822d86/go.mod h1:62Rp/6EtTxoeJDSdtpA3tJp3y3ZRpsiekBSje+K8htA=
 github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ=

internal/db/db.go 🔗

@@ -78,9 +78,6 @@ func Prepare(ctx context.Context, db DBTX) (*Queries, error) {
 	if q.listSessionsStmt, err = db.PrepareContext(ctx, listSessions); err != nil {
 		return nil, fmt.Errorf("error preparing query ListSessions: %w", err)
 	}
-	if q.updateFileStmt, err = db.PrepareContext(ctx, updateFile); err != nil {
-		return nil, fmt.Errorf("error preparing query UpdateFile: %w", err)
-	}
 	if q.updateMessageStmt, err = db.PrepareContext(ctx, updateMessage); err != nil {
 		return nil, fmt.Errorf("error preparing query UpdateMessage: %w", err)
 	}
@@ -182,11 +179,6 @@ func (q *Queries) Close() error {
 			err = fmt.Errorf("error closing listSessionsStmt: %w", cerr)
 		}
 	}
-	if q.updateFileStmt != nil {
-		if cerr := q.updateFileStmt.Close(); cerr != nil {
-			err = fmt.Errorf("error closing updateFileStmt: %w", cerr)
-		}
-	}
 	if q.updateMessageStmt != nil {
 		if cerr := q.updateMessageStmt.Close(); cerr != nil {
 			err = fmt.Errorf("error closing updateMessageStmt: %w", cerr)
@@ -254,7 +246,6 @@ type Queries struct {
 	listMessagesBySessionStmt   *sql.Stmt
 	listNewFilesStmt            *sql.Stmt
 	listSessionsStmt            *sql.Stmt
-	updateFileStmt              *sql.Stmt
 	updateMessageStmt           *sql.Stmt
 	updateSessionStmt           *sql.Stmt
 }
@@ -281,7 +272,6 @@ func (q *Queries) WithTx(tx *sql.Tx) *Queries {
 		listMessagesBySessionStmt:   q.listMessagesBySessionStmt,
 		listNewFilesStmt:            q.listNewFilesStmt,
 		listSessionsStmt:            q.listSessionsStmt,
-		updateFileStmt:              q.updateFileStmt,
 		updateMessageStmt:           q.updateMessageStmt,
 		updateSessionStmt:           q.updateSessionStmt,
 	}

internal/db/files.sql.go 🔗

@@ -29,7 +29,7 @@ type CreateFileParams struct {
 	SessionID string `json:"session_id"`
 	Path      string `json:"path"`
 	Content   string `json:"content"`
-	Version   string `json:"version"`
+	Version   int64  `json:"version"`
 }
 
 func (q *Queries) CreateFile(ctx context.Context, arg CreateFileParams) (File, error) {
@@ -98,7 +98,7 @@ const getFileByPathAndSession = `-- name: GetFileByPathAndSession :one
 SELECT id, session_id, path, content, version, created_at, updated_at
 FROM files
 WHERE path = ? AND session_id = ?
-ORDER BY created_at DESC
+ORDER BY version DESC, created_at DESC
 LIMIT 1
 `
 
@@ -126,7 +126,7 @@ const listFilesByPath = `-- name: ListFilesByPath :many
 SELECT id, session_id, path, content, version, created_at, updated_at
 FROM files
 WHERE path = ?
-ORDER BY created_at DESC
+ORDER BY version DESC, created_at DESC
 `
 
 func (q *Queries) ListFilesByPath(ctx context.Context, path string) ([]File, error) {
@@ -164,7 +164,7 @@ const listFilesBySession = `-- name: ListFilesBySession :many
 SELECT id, session_id, path, content, version, created_at, updated_at
 FROM files
 WHERE session_id = ?
-ORDER BY created_at ASC
+ORDER BY version ASC, created_at ASC
 `
 
 func (q *Queries) ListFilesBySession(ctx context.Context, sessionID string) ([]File, error) {
@@ -202,10 +202,10 @@ const listLatestSessionFiles = `-- name: ListLatestSessionFiles :many
 SELECT f.id, f.session_id, f.path, f.content, f.version, f.created_at, f.updated_at
 FROM files f
 INNER JOIN (
-    SELECT path, MAX(created_at) as max_created_at
+    SELECT path, MAX(version) as max_version, MAX(created_at) as max_created_at
     FROM files
     GROUP BY path
-) latest ON f.path = latest.path AND f.created_at = latest.max_created_at
+) latest ON f.path = latest.path AND f.version = latest.max_version AND f.created_at = latest.max_created_at
 WHERE f.session_id = ?
 ORDER BY f.path
 `
@@ -245,7 +245,7 @@ const listNewFiles = `-- name: ListNewFiles :many
 SELECT id, session_id, path, content, version, created_at, updated_at
 FROM files
 WHERE is_new = 1
-ORDER BY created_at DESC
+ORDER BY version DESC, created_at DESC
 `
 
 func (q *Queries) ListNewFiles(ctx context.Context) ([]File, error) {
@@ -278,34 +278,3 @@ func (q *Queries) ListNewFiles(ctx context.Context) ([]File, error) {
 	}
 	return items, nil
 }
-
-const updateFile = `-- name: UpdateFile :one
-UPDATE files
-SET
-    content = ?,
-    version = ?,
-    updated_at = strftime('%s', 'now')
-WHERE id = ?
-RETURNING id, session_id, path, content, version, created_at, updated_at
-`
-
-type UpdateFileParams struct {
-	Content string `json:"content"`
-	Version string `json:"version"`
-	ID      string `json:"id"`
-}
-
-func (q *Queries) UpdateFile(ctx context.Context, arg UpdateFileParams) (File, error) {
-	row := q.queryRow(ctx, q.updateFileStmt, updateFile, arg.Content, arg.Version, arg.ID)
-	var i File
-	err := row.Scan(
-		&i.ID,
-		&i.SessionID,
-		&i.Path,
-		&i.Content,
-		&i.Version,
-		&i.CreatedAt,
-		&i.UpdatedAt,
-	)
-	return i, err
-}

internal/db/migrations/20250424200609_initial.sql 🔗

@@ -26,7 +26,7 @@ CREATE TABLE IF NOT EXISTS files (
     session_id TEXT NOT NULL,
     path TEXT NOT NULL,
     content TEXT NOT NULL,
-    version TEXT NOT NULL,
+    version INTEGER NOT NULL DEFAULT 0,
     created_at INTEGER NOT NULL,  -- Unix timestamp in milliseconds
     updated_at INTEGER NOT NULL,  -- Unix timestamp in milliseconds
     FOREIGN KEY (session_id) REFERENCES sessions (id) ON DELETE CASCADE,

internal/db/models.go 🔗

@@ -13,7 +13,7 @@ type File struct {
 	SessionID string `json:"session_id"`
 	Path      string `json:"path"`
 	Content   string `json:"content"`
-	Version   string `json:"version"`
+	Version   int64  `json:"version"`
 	CreatedAt int64  `json:"created_at"`
 	UpdatedAt int64  `json:"updated_at"`
 }

internal/db/querier.go 🔗

@@ -27,7 +27,6 @@ type Querier interface {
 	ListMessagesBySession(ctx context.Context, sessionID string) ([]Message, error)
 	ListNewFiles(ctx context.Context) ([]File, error)
 	ListSessions(ctx context.Context) ([]Session, error)
-	UpdateFile(ctx context.Context, arg UpdateFileParams) (File, error)
 	UpdateMessage(ctx context.Context, arg UpdateMessageParams) error
 	UpdateSession(ctx context.Context, arg UpdateSessionParams) (Session, error)
 }

internal/db/sql/files.sql 🔗

@@ -7,20 +7,20 @@ WHERE id = ? LIMIT 1;
 SELECT *
 FROM files
 WHERE path = ? AND session_id = ?
-ORDER BY created_at DESC
+ORDER BY version DESC, created_at DESC
 LIMIT 1;
 
 -- name: ListFilesBySession :many
 SELECT *
 FROM files
 WHERE session_id = ?
-ORDER BY created_at ASC;
+ORDER BY version ASC, created_at ASC;
 
 -- name: ListFilesByPath :many
 SELECT *
 FROM files
 WHERE path = ?
-ORDER BY created_at DESC;
+ORDER BY version DESC, created_at DESC;
 
 -- name: CreateFile :one
 INSERT INTO files (
@@ -36,15 +36,6 @@ INSERT INTO files (
 )
 RETURNING *;
 
--- name: UpdateFile :one
-UPDATE files
-SET
-    content = ?,
-    version = ?,
-    updated_at = strftime('%s', 'now')
-WHERE id = ?
-RETURNING *;
-
 -- name: DeleteFile :exec
 DELETE FROM files
 WHERE id = ?;
@@ -57,10 +48,10 @@ WHERE session_id = ?;
 SELECT f.*
 FROM files f
 INNER JOIN (
-    SELECT path, MAX(created_at) as max_created_at
+    SELECT path, MAX(version) as max_version, MAX(created_at) as max_created_at
     FROM files
     GROUP BY path
-) latest ON f.path = latest.path AND f.created_at = latest.max_created_at
+) latest ON f.path = latest.path AND f.version = latest.max_version AND f.created_at = latest.max_created_at
 WHERE f.session_id = ?
 ORDER BY f.path;
 
@@ -68,4 +59,4 @@ ORDER BY f.path;
 SELECT *
 FROM files
 WHERE is_new = 1
-ORDER BY created_at DESC;
+ORDER BY version DESC, created_at DESC;

internal/exp/diffview/Taskfile.yaml 🔗

@@ -0,0 +1,102 @@
+version: "3"
+
+tasks:
+  test:
+    desc: Run tests
+    cmds:
+      - go test ./... {{.CLI_ARGS}}
+
+  test:update:
+    desc: Run tests and update golden files
+    cmds:
+      - go test ./... -update {{.CLI_ARGS}}
+
+  test:print:
+    desc: Print golden files for debugging
+    method: none
+    sources:
+      - ./testdata/TestDiffView/**/*.golden
+    cmds:
+      - for: sources
+        cmd: echo && echo "------- {{.ITEM}} -------" && echo && cat {{.ITEM}}
+    silent: true
+
+  test:print:width:unified:
+    desc: Print golden files for debugging
+    method: none
+    sources:
+      - ./testdata/TestDiffViewWidth/Unified/*.golden
+    cmds:
+      - for: sources
+        cmd: echo && echo "------- {{.ITEM}} -------" && echo && cat {{.ITEM}}
+    silent: true
+
+  test:print:width:split:
+    desc: Print golden files for debugging
+    method: none
+    sources:
+      - ./testdata/TestDiffViewWidth/Split/*.golden
+    cmds:
+      - for: sources
+        cmd: echo && echo "------- {{.ITEM}} -------" && echo && cat {{.ITEM}}
+    silent: true
+
+  test:print:height:unified:
+    desc: Print golden files for debugging
+    method: none
+    sources:
+      - ./testdata/TestDiffViewHeight/Unified/*.golden
+    cmds:
+      - for: sources
+        cmd: echo && echo "------- {{.ITEM}} -------" && echo && cat {{.ITEM}}
+    silent: true
+
+  test:print:height:split:
+    desc: Print golden files for debugging
+    method: none
+    sources:
+      - ./testdata/TestDiffViewHeight/Split/*.golden
+    cmds:
+      - for: sources
+        cmd: echo && echo "------- {{.ITEM}} -------" && echo && cat {{.ITEM}}
+    silent: true
+
+  test:print:xoffset:unified:
+    desc: Print golden files for debugging
+    method: none
+    sources:
+      - ./testdata/TestDiffViewXOffset/Unified/*.golden
+    cmds:
+      - for: sources
+        cmd: echo && echo "------- {{.ITEM}} -------" && echo && cat {{.ITEM}}
+    silent: true
+
+  test:print:xoffset:split:
+    desc: Print golden files for debugging
+    method: none
+    sources:
+      - ./testdata/TestDiffViewXOffset/Split/*.golden
+    cmds:
+      - for: sources
+        cmd: echo && echo "------- {{.ITEM}} -------" && echo && cat {{.ITEM}}
+    silent: true
+
+  test:print:yoffset:unified:
+    desc: Print golden files for debugging
+    method: none
+    sources:
+      - ./testdata/TestDiffViewYOffset/Unified/*.golden
+    cmds:
+      - for: sources
+        cmd: echo && echo "------- {{.ITEM}} -------" && echo && cat {{.ITEM}}
+    silent: true
+
+  test:print:yoffset:split:
+    desc: Print golden files for debugging
+    method: none
+    sources:
+      - ./testdata/TestDiffViewYOffset/Split/*.golden
+    cmds:
+      - for: sources
+        cmd: echo && echo "------- {{.ITEM}} -------" && echo && cat {{.ITEM}}
+    silent: true

internal/exp/diffview/chroma.go 🔗

@@ -0,0 +1,52 @@
+package diffview
+
+import (
+	"fmt"
+	"image/color"
+	"io"
+
+	"github.com/alecthomas/chroma/v2"
+	"github.com/charmbracelet/lipgloss/v2"
+)
+
+var _ chroma.Formatter = chromaFormatter{}
+
+// chromaFormatter is a custom formatter for Chroma that uses Lip Gloss for
+// foreground styling, while keeping a forced background color.
+type chromaFormatter struct {
+	bgColor color.Color
+}
+
+// Format implements the chroma.Formatter interface.
+func (c chromaFormatter) Format(w io.Writer, style *chroma.Style, it chroma.Iterator) error {
+	for token := it(); token != chroma.EOF; token = it() {
+		entry := style.Get(token.Type)
+		if entry.IsZero() {
+			if _, err := fmt.Fprint(w, token.Value); err != nil {
+				return err
+			}
+			continue
+		}
+
+		s := lipgloss.NewStyle().
+			Background(c.bgColor)
+
+		if entry.Bold == chroma.Yes {
+			s = s.Bold(true)
+		}
+		if entry.Underline == chroma.Yes {
+			s = s.Underline(true)
+		}
+		if entry.Italic == chroma.Yes {
+			s = s.Italic(true)
+		}
+		if entry.Colour.IsSet() {
+			s = s.Foreground(lipgloss.Color(entry.Colour.String()))
+		}
+
+		if _, err := fmt.Fprint(w, s.Render(token.Value)); err != nil {
+			return err
+		}
+	}
+	return nil
+}

internal/exp/diffview/diffview.go 🔗

@@ -0,0 +1,681 @@
+package diffview
+
+import (
+	"fmt"
+	"image/color"
+	"strconv"
+	"strings"
+
+	"github.com/alecthomas/chroma/v2"
+	"github.com/alecthomas/chroma/v2/lexers"
+	"github.com/aymanbagabas/go-udiff"
+	"github.com/aymanbagabas/go-udiff/myers"
+	"github.com/charmbracelet/lipgloss/v2"
+	"github.com/charmbracelet/x/ansi"
+)
+
+const (
+	leadingSymbolsSize = 2
+	lineNumPadding     = 1
+)
+
+type file struct {
+	path    string
+	content string
+}
+
+type layout int
+
+const (
+	layoutUnified layout = iota + 1
+	layoutSplit
+)
+
+// DiffView represents a view for displaying differences between two files.
+type DiffView struct {
+	layout       layout
+	before       file
+	after        file
+	contextLines int
+	lineNumbers  bool
+	highlight    bool
+	height       int
+	width        int
+	xOffset      int
+	yOffset      int
+	style        Style
+	tabWidth     int
+	chromaStyle  *chroma.Style
+
+	isComputed bool
+	err        error
+	unified    udiff.UnifiedDiff
+	edits      []udiff.Edit
+
+	splitHunks []splitHunk
+
+	codeWidth       int
+	fullCodeWidth   int  // with leading symbols
+	extraColOnAfter bool // add extra column on after panel
+	beforeNumDigits int
+	afterNumDigits  int
+}
+
+// New creates a new DiffView with default settings.
+func New() *DiffView {
+	dv := &DiffView{
+		layout:       layoutUnified,
+		contextLines: udiff.DefaultContextLines,
+		lineNumbers:  true,
+		tabWidth:     8,
+	}
+	dv.style = DefaultDarkStyle()
+	return dv
+}
+
+// Unified sets the layout of the DiffView to unified.
+func (dv *DiffView) Unified() *DiffView {
+	dv.layout = layoutUnified
+	return dv
+}
+
+// Split sets the layout of the DiffView to split (side-by-side).
+func (dv *DiffView) Split() *DiffView {
+	dv.layout = layoutSplit
+	return dv
+}
+
+// Before sets the "before" file for the DiffView.
+func (dv *DiffView) Before(path, content string) *DiffView {
+	dv.before = file{path: path, content: content}
+	return dv
+}
+
+// After sets the "after" file for the DiffView.
+func (dv *DiffView) After(path, content string) *DiffView {
+	dv.after = file{path: path, content: content}
+	return dv
+}
+
+// ContextLines sets the number of context lines for the DiffView.
+func (dv *DiffView) ContextLines(contextLines int) *DiffView {
+	dv.contextLines = contextLines
+	return dv
+}
+
+// Style sets the style for the DiffView.
+func (dv *DiffView) Style(style Style) *DiffView {
+	dv.style = style
+	return dv
+}
+
+// LineNumbers sets whether to display line numbers in the DiffView.
+func (dv *DiffView) LineNumbers(lineNumbers bool) *DiffView {
+	dv.lineNumbers = lineNumbers
+	return dv
+}
+
+// SyntaxHightlight sets whether to enable syntax highlighting in the DiffView.
+func (dv *DiffView) SyntaxHightlight(highlight bool) *DiffView {
+	dv.highlight = highlight
+	return dv
+}
+
+// Height sets the height of the DiffView.
+func (dv *DiffView) Height(height int) *DiffView {
+	dv.height = height
+	return dv
+}
+
+// Width sets the width of the DiffView.
+func (dv *DiffView) Width(width int) *DiffView {
+	dv.width = width
+	return dv
+}
+
+// XOffset sets the horizontal offset for the DiffView.
+func (dv *DiffView) XOffset(xOffset int) *DiffView {
+	dv.xOffset = xOffset
+	return dv
+}
+
+// YOffset sets the vertical offset for the DiffView.
+func (dv *DiffView) YOffset(yOffset int) *DiffView {
+	dv.yOffset = yOffset
+	return dv
+}
+
+// TabWidth sets the tab width. Only relevant for code that contains tabs, like
+// Go code.
+func (dv *DiffView) TabWidth(tabWidth int) *DiffView {
+	dv.tabWidth = tabWidth
+	return dv
+}
+
+// ChromaStyle sets the chroma style for syntax highlighting.
+// If nil, no syntax highlighting will be applied.
+func (dv *DiffView) ChromaStyle(style *chroma.Style) *DiffView {
+	dv.chromaStyle = style
+	return dv
+}
+
+// String returns the string representation of the DiffView.
+func (dv *DiffView) String() string {
+	dv.replaceTabs()
+	if err := dv.computeDiff(); err != nil {
+		return err.Error()
+	}
+	dv.convertDiffToSplit()
+	dv.adjustStyles()
+	dv.detectNumDigits()
+
+	if dv.width <= 0 {
+		dv.detectCodeWidth()
+	} else {
+		dv.resizeCodeWidth()
+	}
+
+	style := lipgloss.NewStyle()
+	if dv.width > 0 {
+		style = style.MaxWidth(dv.width)
+	}
+	if dv.height > 0 {
+		style = style.MaxHeight(dv.height)
+	}
+
+	switch dv.layout {
+	case layoutUnified:
+		return style.Render(strings.TrimSuffix(dv.renderUnified(), "\n"))
+	case layoutSplit:
+		return style.Render(strings.TrimSuffix(dv.renderSplit(), "\n"))
+	default:
+		panic("unknown diffview layout")
+	}
+}
+
+// replaceTabs replaces tabs in the before and after file contents with spaces
+// according to the specified tab width.
+func (dv *DiffView) replaceTabs() {
+	spaces := strings.Repeat(" ", dv.tabWidth)
+	dv.before.content = strings.ReplaceAll(dv.before.content, "\t", spaces)
+	dv.after.content = strings.ReplaceAll(dv.after.content, "\t", spaces)
+}
+
+// computeDiff computes the differences between the "before" and "after" files.
+func (dv *DiffView) computeDiff() error {
+	if dv.isComputed {
+		return dv.err
+	}
+	dv.isComputed = true
+	dv.edits = myers.ComputeEdits( //nolint:staticcheck
+		dv.before.content,
+		dv.after.content,
+	)
+	dv.unified, dv.err = udiff.ToUnifiedDiff(
+		dv.before.path,
+		dv.after.path,
+		dv.before.content,
+		dv.edits,
+		dv.contextLines,
+	)
+	return dv.err
+}
+
+// convertDiffToSplit converts the unified diff to a split diff if the layout is
+// set to split.
+func (dv *DiffView) convertDiffToSplit() {
+	if dv.layout != layoutSplit {
+		return
+	}
+
+	dv.splitHunks = make([]splitHunk, len(dv.unified.Hunks))
+	for i, h := range dv.unified.Hunks {
+		dv.splitHunks[i] = hunkToSplit(h)
+	}
+}
+
+// adjustStyles adjusts adds padding and alignment to the styles.
+func (dv *DiffView) adjustStyles() {
+	setPadding := func(s lipgloss.Style) lipgloss.Style {
+		return s.Padding(0, lineNumPadding).Align(lipgloss.Right)
+	}
+	dv.style.MissingLine.LineNumber = setPadding(dv.style.MissingLine.LineNumber)
+	dv.style.DividerLine.LineNumber = setPadding(dv.style.DividerLine.LineNumber)
+	dv.style.EqualLine.LineNumber = setPadding(dv.style.EqualLine.LineNumber)
+	dv.style.InsertLine.LineNumber = setPadding(dv.style.InsertLine.LineNumber)
+	dv.style.DeleteLine.LineNumber = setPadding(dv.style.DeleteLine.LineNumber)
+}
+
+// detectNumDigits calculates the maximum number of digits needed for before and
+// after line numbers.
+func (dv *DiffView) detectNumDigits() {
+	dv.beforeNumDigits = 0
+	dv.afterNumDigits = 0
+
+	for _, h := range dv.unified.Hunks {
+		dv.beforeNumDigits = max(dv.beforeNumDigits, len(strconv.Itoa(h.FromLine+len(h.Lines))))
+		dv.afterNumDigits = max(dv.afterNumDigits, len(strconv.Itoa(h.ToLine+len(h.Lines))))
+	}
+}
+
+// detectCodeWidth calculates the maximum width of code lines in the diff view.
+func (dv *DiffView) detectCodeWidth() {
+	switch dv.layout {
+	case layoutUnified:
+		dv.detectUnifiedCodeWidth()
+	case layoutSplit:
+		dv.detectSplitCodeWidth()
+	}
+	dv.fullCodeWidth = dv.codeWidth + leadingSymbolsSize
+}
+
+// detectUnifiedCodeWidth calculates the maximum width of code lines in a
+// unified diff.
+func (dv *DiffView) detectUnifiedCodeWidth() {
+	dv.codeWidth = 0
+
+	for _, h := range dv.unified.Hunks {
+		shownLines := ansi.StringWidth(dv.hunkLineFor(h))
+
+		for _, l := range h.Lines {
+			lineWidth := ansi.StringWidth(strings.TrimSuffix(l.Content, "\n")) + 1
+			dv.codeWidth = max(dv.codeWidth, lineWidth, shownLines)
+		}
+	}
+}
+
+// detectSplitCodeWidth calculates the maximum width of code lines in a
+// split diff.
+func (dv *DiffView) detectSplitCodeWidth() {
+	dv.codeWidth = 0
+
+	for i, h := range dv.splitHunks {
+		shownLines := ansi.StringWidth(dv.hunkLineFor(dv.unified.Hunks[i]))
+
+		for _, l := range h.lines {
+			if l.before != nil {
+				codeWidth := ansi.StringWidth(strings.TrimSuffix(l.before.Content, "\n")) + 1
+				dv.codeWidth = max(dv.codeWidth, codeWidth, shownLines)
+			}
+			if l.after != nil {
+				codeWidth := ansi.StringWidth(strings.TrimSuffix(l.after.Content, "\n")) + 1
+				dv.codeWidth = max(dv.codeWidth, codeWidth, shownLines)
+			}
+		}
+	}
+}
+
+// resizeCodeWidth resizes the code width to fit within the specified width.
+func (dv *DiffView) resizeCodeWidth() {
+	fullNumWidth := dv.beforeNumDigits + dv.afterNumDigits
+	fullNumWidth += lineNumPadding * 4 // left and right padding for both line numbers
+
+	switch dv.layout {
+	case layoutUnified:
+		dv.codeWidth = dv.width - fullNumWidth - leadingSymbolsSize
+	case layoutSplit:
+		remainingWidth := dv.width - fullNumWidth - leadingSymbolsSize*2
+		dv.codeWidth = remainingWidth / 2
+		dv.extraColOnAfter = isOdd(remainingWidth)
+	}
+
+	dv.fullCodeWidth = dv.codeWidth + leadingSymbolsSize
+}
+
+// renderUnified renders the unified diff view as a string.
+func (dv *DiffView) renderUnified() string {
+	var b strings.Builder
+
+	fullContentStyle := lipgloss.NewStyle().MaxWidth(dv.fullCodeWidth)
+	printedLines := -dv.yOffset
+
+	write := func(s string) {
+		if printedLines >= 0 {
+			b.WriteString(s)
+		}
+	}
+
+outer:
+	for i, h := range dv.unified.Hunks {
+		ls := dv.style.DividerLine
+		if dv.lineNumbers {
+			write(ls.LineNumber.Render(pad("…", dv.beforeNumDigits)))
+			write(ls.LineNumber.Render(pad("…", dv.afterNumDigits)))
+		}
+		content := ansi.Truncate(dv.hunkLineFor(h), dv.fullCodeWidth, "…")
+		write(ls.Code.Width(dv.fullCodeWidth).Render(content))
+		write("\n")
+		printedLines++
+
+		beforeLine := h.FromLine
+		afterLine := h.ToLine
+
+		for j, l := range h.Lines {
+			// print ellipis if we don't have enough space to print the rest of the diff
+			hasReachedHeight := dv.height > 0 && printedLines+1 == dv.height
+			isLastHunk := i+1 == len(dv.unified.Hunks)
+			isLastLine := j+1 == len(h.Lines)
+			if hasReachedHeight && (!isLastHunk || !isLastLine) {
+				ls := dv.lineStyleForType(l.Kind)
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad("…", dv.beforeNumDigits)))
+					write(ls.LineNumber.Render(pad("…", dv.afterNumDigits)))
+				}
+				write(fullContentStyle.Render(
+					ls.Code.Width(dv.fullCodeWidth).Render("  …"),
+				))
+				write("\n")
+				break outer
+			}
+
+			getContent := func(ls LineStyle) string {
+				content := strings.TrimSuffix(l.Content, "\n")
+				content = dv.hightlightCode(content, ls.Code.GetBackground())
+				content = ansi.GraphemeWidth.Cut(content, dv.xOffset, len(content))
+				content = ansi.Truncate(content, dv.codeWidth, "…")
+				return content
+			}
+
+			leadingEllipsis := dv.xOffset > 0 && strings.TrimSpace(content) != ""
+
+			switch l.Kind {
+			case udiff.Equal:
+				ls := dv.style.EqualLine
+				content := getContent(ls)
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad(beforeLine, dv.beforeNumDigits)))
+					write(ls.LineNumber.Render(pad(afterLine, dv.afterNumDigits)))
+				}
+				write(fullContentStyle.Render(
+					ls.Code.Width(dv.fullCodeWidth).Render(ternary(leadingEllipsis, " …", "  ") + content),
+				))
+				beforeLine++
+				afterLine++
+			case udiff.Insert:
+				ls := dv.style.InsertLine
+				content := getContent(ls)
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad(" ", dv.beforeNumDigits)))
+					write(ls.LineNumber.Render(pad(afterLine, dv.afterNumDigits)))
+				}
+				write(fullContentStyle.Render(
+					ls.Symbol.Render(ternary(leadingEllipsis, "+…", "+ ")) +
+						ls.Code.Width(dv.codeWidth).Render(content),
+				))
+				afterLine++
+			case udiff.Delete:
+				ls := dv.style.DeleteLine
+				content := getContent(ls)
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad(beforeLine, dv.beforeNumDigits)))
+					write(ls.LineNumber.Render(pad(" ", dv.afterNumDigits)))
+				}
+				write(fullContentStyle.Render(
+					ls.Symbol.Render(ternary(leadingEllipsis, "-…", "- ")) +
+						ls.Code.Width(dv.codeWidth).Render(content),
+				))
+				beforeLine++
+			}
+			write("\n")
+
+			printedLines++
+		}
+	}
+
+	for printedLines < dv.height {
+		ls := dv.style.MissingLine
+		if dv.lineNumbers {
+			write(ls.LineNumber.Render(pad(" ", dv.beforeNumDigits)))
+			write(ls.LineNumber.Render(pad(" ", dv.afterNumDigits)))
+		}
+		write(ls.Code.Width(dv.fullCodeWidth).Render("  "))
+		write("\n")
+		printedLines++
+	}
+
+	return b.String()
+}
+
+// renderSplit renders the split (side-by-side) diff view as a string.
+func (dv *DiffView) renderSplit() string {
+	var b strings.Builder
+
+	beforeFullContentStyle := lipgloss.NewStyle().MaxWidth(dv.fullCodeWidth)
+	afterFullContentStyle := lipgloss.NewStyle().MaxWidth(dv.fullCodeWidth + btoi(dv.extraColOnAfter))
+	printedLines := -dv.yOffset
+
+	write := func(s string) {
+		if printedLines >= 0 {
+			b.WriteString(s)
+		}
+	}
+
+outer:
+	for i, h := range dv.splitHunks {
+		ls := dv.style.DividerLine
+		if dv.lineNumbers {
+			write(ls.LineNumber.Render(pad("…", dv.beforeNumDigits)))
+		}
+		content := ansi.Truncate(dv.hunkLineFor(dv.unified.Hunks[i]), dv.fullCodeWidth, "…")
+		write(ls.Code.Width(dv.fullCodeWidth).Render(content))
+		if dv.lineNumbers {
+			write(ls.LineNumber.Render(pad("…", dv.afterNumDigits)))
+		}
+		write(ls.Code.Width(dv.fullCodeWidth + btoi(dv.extraColOnAfter)).Render(" "))
+		write("\n")
+		printedLines++
+
+		beforeLine := h.fromLine
+		afterLine := h.toLine
+
+		for j, l := range h.lines {
+			// print ellipis if we don't have enough space to print the rest of the diff
+			hasReachedHeight := dv.height > 0 && printedLines+1 == dv.height
+			isLastHunk := i+1 == len(dv.unified.Hunks)
+			isLastLine := j+1 == len(h.lines)
+			if hasReachedHeight && (!isLastHunk || !isLastLine) {
+				ls := dv.style.MissingLine
+				if l.before != nil {
+					ls = dv.lineStyleForType(l.before.Kind)
+				}
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad("…", dv.beforeNumDigits)))
+				}
+				write(beforeFullContentStyle.Render(
+					ls.Code.Width(dv.fullCodeWidth).Render("  …"),
+				))
+				ls = dv.style.MissingLine
+				if l.after != nil {
+					ls = dv.lineStyleForType(l.after.Kind)
+				}
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad("…", dv.afterNumDigits)))
+				}
+				write(afterFullContentStyle.Render(
+					ls.Code.Width(dv.fullCodeWidth).Render("  …"),
+				))
+				write("\n")
+				break outer
+			}
+
+			getContent := func(content string, ls LineStyle) string {
+				content = strings.TrimSuffix(content, "\n")
+				content = dv.hightlightCode(content, ls.Code.GetBackground())
+				content = ansi.GraphemeWidth.Cut(content, dv.xOffset, len(content))
+				content = ansi.Truncate(content, dv.codeWidth, "…")
+				return content
+			}
+			getLeadingEllipsis := func(content string) bool {
+				return dv.xOffset > 0 && strings.TrimSpace(content) != ""
+			}
+
+			switch {
+			case l.before == nil:
+				ls := dv.style.MissingLine
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad(" ", dv.beforeNumDigits)))
+				}
+				write(beforeFullContentStyle.Render(
+					ls.Code.Width(dv.fullCodeWidth).Render("  "),
+				))
+			case l.before.Kind == udiff.Equal:
+				ls := dv.style.EqualLine
+				content := getContent(l.before.Content, ls)
+				leadingEllipsis := getLeadingEllipsis(content)
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad(beforeLine, dv.beforeNumDigits)))
+				}
+				write(beforeFullContentStyle.Render(
+					ls.Code.Width(dv.fullCodeWidth).Render(ternary(leadingEllipsis, " …", "  ") + content),
+				))
+				beforeLine++
+			case l.before.Kind == udiff.Delete:
+				ls := dv.style.DeleteLine
+				content := getContent(l.before.Content, ls)
+				leadingEllipsis := getLeadingEllipsis(content)
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad(beforeLine, dv.beforeNumDigits)))
+				}
+				write(beforeFullContentStyle.Render(
+					ls.Symbol.Render(ternary(leadingEllipsis, "-…", "- ")) +
+						ls.Code.Width(dv.codeWidth).Render(content),
+				))
+				beforeLine++
+			}
+
+			switch {
+			case l.after == nil:
+				ls := dv.style.MissingLine
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad(" ", dv.afterNumDigits)))
+				}
+				write(afterFullContentStyle.Render(
+					ls.Code.Width(dv.fullCodeWidth + btoi(dv.extraColOnAfter)).Render("  "),
+				))
+			case l.after.Kind == udiff.Equal:
+				ls := dv.style.EqualLine
+				content := getContent(l.after.Content, ls)
+				leadingEllipsis := getLeadingEllipsis(content)
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad(afterLine, dv.afterNumDigits)))
+				}
+				write(afterFullContentStyle.Render(
+					ls.Code.Width(dv.fullCodeWidth + btoi(dv.extraColOnAfter)).Render(ternary(leadingEllipsis, " …", "  ") + content),
+				))
+				afterLine++
+			case l.after.Kind == udiff.Insert:
+				ls := dv.style.InsertLine
+				content := getContent(l.after.Content, ls)
+				leadingEllipsis := getLeadingEllipsis(content)
+				if dv.lineNumbers {
+					write(ls.LineNumber.Render(pad(afterLine, dv.afterNumDigits)))
+				}
+				write(afterFullContentStyle.Render(
+					ls.Symbol.Render(ternary(leadingEllipsis, "+…", "+ ")) +
+						ls.Code.Width(dv.codeWidth+btoi(dv.extraColOnAfter)).Render(content),
+				))
+				afterLine++
+			}
+
+			write("\n")
+
+			printedLines++
+		}
+	}
+
+	for printedLines < dv.height {
+		ls := dv.style.MissingLine
+		if dv.lineNumbers {
+			write(ls.LineNumber.Render(pad(" ", dv.beforeNumDigits)))
+		}
+		write(ls.Code.Width(dv.fullCodeWidth).Render(" "))
+		if dv.lineNumbers {
+			write(ls.LineNumber.Render(pad(" ", dv.afterNumDigits)))
+		}
+		write(ls.Code.Width(dv.fullCodeWidth + btoi(dv.extraColOnAfter)).Render(" "))
+		write("\n")
+		printedLines++
+	}
+
+	return b.String()
+}
+
+// hunkLineFor formats the header line for a hunk in the unified diff view.
+func (dv *DiffView) hunkLineFor(h *udiff.Hunk) string {
+	beforeShownLines, afterShownLines := dv.hunkShownLines(h)
+
+	return fmt.Sprintf(
+		"  @@ -%d,%d +%d,%d @@ ",
+		h.FromLine,
+		beforeShownLines,
+		h.ToLine,
+		afterShownLines,
+	)
+}
+
+// hunkShownLines calculates the number of lines shown in a hunk for both before
+// and after versions.
+func (dv *DiffView) hunkShownLines(h *udiff.Hunk) (before, after int) {
+	for _, l := range h.Lines {
+		switch l.Kind {
+		case udiff.Equal:
+			before++
+			after++
+		case udiff.Insert:
+			after++
+		case udiff.Delete:
+			before++
+		}
+	}
+	return
+}
+
+func (dv *DiffView) lineStyleForType(t udiff.OpKind) LineStyle {
+	switch t {
+	case udiff.Equal:
+		return dv.style.EqualLine
+	case udiff.Insert:
+		return dv.style.InsertLine
+	case udiff.Delete:
+		return dv.style.DeleteLine
+	default:
+		return dv.style.MissingLine
+	}
+}
+
+func (dv *DiffView) hightlightCode(source string, bgColor color.Color) string {
+	if dv.chromaStyle == nil {
+		return source
+	}
+
+	l := dv.getChromaLexer(source)
+	f := dv.getChromaFormatter(bgColor)
+
+	it, err := l.Tokenise(nil, source)
+	if err != nil {
+		return source
+	}
+
+	var b strings.Builder
+	if err := f.Format(&b, dv.chromaStyle, it); err != nil {
+		return source
+	}
+	return b.String()
+}
+
+func (dv *DiffView) getChromaLexer(source string) chroma.Lexer {
+	l := lexers.Match(dv.before.path)
+	if l == nil {
+		l = lexers.Analyse(source)
+	}
+	if l == nil {
+		l = lexers.Fallback
+	}
+	return chroma.Coalesce(l)
+}
+
+func (dv *DiffView) getChromaFormatter(gbColor color.Color) chroma.Formatter {
+	return chromaFormatter{
+		bgColor: gbColor,
+	}
+}

internal/exp/diffview/diffview_test.go 🔗

@@ -0,0 +1,300 @@
+package diffview_test
+
+import (
+	_ "embed"
+	"fmt"
+	"strings"
+	"testing"
+
+	"github.com/alecthomas/chroma/v2/styles"
+	"github.com/charmbracelet/crush/internal/exp/diffview"
+	"github.com/charmbracelet/x/ansi"
+	"github.com/charmbracelet/x/exp/golden"
+)
+
+//go:embed testdata/TestDefault.before
+var TestDefaultBefore string
+
+//go:embed testdata/TestDefault.after
+var TestDefaultAfter string
+
+//go:embed testdata/TestMultipleHunks.before
+var TestMultipleHunksBefore string
+
+//go:embed testdata/TestMultipleHunks.after
+var TestMultipleHunksAfter string
+
+//go:embed testdata/TestNarrow.before
+var TestNarrowBefore string
+
+//go:embed testdata/TestNarrow.after
+var TestNarrowAfter string
+
+//go:embed testdata/TestTabs.before
+var TestTabsBefore string
+
+//go:embed testdata/TestTabs.after
+var TestTabsAfter string
+
+type (
+	TestFunc  func(dv *diffview.DiffView) *diffview.DiffView
+	TestFuncs map[string]TestFunc
+)
+
+var (
+	UnifiedFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.Unified()
+	}
+	SplitFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.Split()
+	}
+
+	DefaultFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.
+			Before("main.go", TestDefaultBefore).
+			After("main.go", TestDefaultAfter)
+	}
+	NoLineNumbersFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.
+			Before("main.go", TestDefaultBefore).
+			After("main.go", TestDefaultAfter).
+			LineNumbers(false)
+	}
+	MultipleHunksFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.
+			Before("main.go", TestMultipleHunksBefore).
+			After("main.go", TestMultipleHunksAfter)
+	}
+	CustomContextLinesFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.
+			Before("main.go", TestMultipleHunksBefore).
+			After("main.go", TestMultipleHunksAfter).
+			ContextLines(4)
+	}
+	NarrowFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.
+			Before("text.txt", TestNarrowBefore).
+			After("text.txt", TestNarrowAfter)
+	}
+	SmallWidthFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.
+			Before("main.go", TestMultipleHunksBefore).
+			After("main.go", TestMultipleHunksAfter).
+			Width(40)
+	}
+	LargeWidthFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.
+			Before("main.go", TestMultipleHunksBefore).
+			After("main.go", TestMultipleHunksAfter).
+			Width(120)
+	}
+	NoSyntaxHighlightFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.
+			Before("main.go", TestMultipleHunksBefore).
+			After("main.go", TestMultipleHunksAfter).
+			ChromaStyle(nil)
+	}
+
+	LightModeFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.
+			Style(diffview.DefaultLightStyle()).
+			ChromaStyle(styles.Get("catppuccin-latte"))
+	}
+	DarkModeFunc = func(dv *diffview.DiffView) *diffview.DiffView {
+		return dv.
+			Style(diffview.DefaultDarkStyle()).
+			ChromaStyle(styles.Get("catppuccin-macchiato"))
+	}
+
+	LayoutFuncs = TestFuncs{
+		"Unified": UnifiedFunc,
+		"Split":   SplitFunc,
+	}
+	BehaviorFuncs = TestFuncs{
+		"Default":            DefaultFunc,
+		"NoLineNumbers":      NoLineNumbersFunc,
+		"MultipleHunks":      MultipleHunksFunc,
+		"CustomContextLines": CustomContextLinesFunc,
+		"Narrow":             NarrowFunc,
+		"SmallWidth":         SmallWidthFunc,
+		"LargeWidth":         LargeWidthFunc,
+		"NoSyntaxHighlight":  NoSyntaxHighlightFunc,
+	}
+	ThemeFuncs = TestFuncs{
+		"LightMode": LightModeFunc,
+		"DarkMode":  DarkModeFunc,
+	}
+)
+
+func TestDiffView(t *testing.T) {
+	for layoutName, layoutFunc := range LayoutFuncs {
+		t.Run(layoutName, func(t *testing.T) {
+			for behaviorName, behaviorFunc := range BehaviorFuncs {
+				t.Run(behaviorName, func(t *testing.T) {
+					for themeName, themeFunc := range ThemeFuncs {
+						t.Run(themeName, func(t *testing.T) {
+							t.Parallel()
+
+							dv := diffview.New()
+							dv = layoutFunc(dv)
+							dv = themeFunc(dv)
+							dv = behaviorFunc(dv)
+
+							output := dv.String()
+							golden.RequireEqual(t, []byte(output))
+
+							switch behaviorName {
+							case "SmallWidth":
+								assertLineWidth(t, 40, output)
+							case "LargeWidth":
+								assertLineWidth(t, 120, output)
+							}
+						})
+					}
+				})
+			}
+		})
+	}
+}
+
+func TestDiffViewTabs(t *testing.T) {
+	for layoutName, layoutFunc := range LayoutFuncs {
+		t.Run(layoutName, func(t *testing.T) {
+			t.Parallel()
+
+			dv := diffview.New().
+				Before("main.go", TestTabsBefore).
+				After("main.go", TestTabsAfter).
+				Style(diffview.DefaultLightStyle()).
+				ChromaStyle(styles.Get("catppuccin-latte"))
+			dv = layoutFunc(dv)
+
+			output := dv.String()
+			golden.RequireEqual(t, []byte(output))
+		})
+	}
+}
+
+func TestDiffViewWidth(t *testing.T) {
+	for layoutName, layoutFunc := range LayoutFuncs {
+		t.Run(layoutName, func(t *testing.T) {
+			for width := 1; width <= 110; width++ {
+				if layoutName == "Unified" && width > 60 {
+					continue
+				}
+
+				t.Run(fmt.Sprintf("WidthOf%03d", width), func(t *testing.T) {
+					t.Parallel()
+
+					dv := diffview.New().
+						Before("main.go", TestMultipleHunksBefore).
+						After("main.go", TestMultipleHunksAfter).
+						Width(width).
+						Style(diffview.DefaultLightStyle()).
+						ChromaStyle(styles.Get("catppuccin-latte"))
+					dv = layoutFunc(dv)
+
+					output := dv.String()
+					golden.RequireEqual(t, []byte(output))
+
+					assertLineWidth(t, width, output)
+				})
+			}
+		})
+	}
+}
+
+func TestDiffViewHeight(t *testing.T) {
+	for layoutName, layoutFunc := range LayoutFuncs {
+		t.Run(layoutName, func(t *testing.T) {
+			for height := 1; height <= 20; height++ {
+				t.Run(fmt.Sprintf("HeightOf%03d", height), func(t *testing.T) {
+					t.Parallel()
+
+					dv := diffview.New().
+						Before("main.go", TestMultipleHunksBefore).
+						After("main.go", TestMultipleHunksAfter).
+						Height(height).
+						Style(diffview.DefaultLightStyle()).
+						ChromaStyle(styles.Get("catppuccin-latte"))
+					dv = layoutFunc(dv)
+
+					output := dv.String()
+					golden.RequireEqual(t, []byte(output))
+
+					assertHeight(t, height, output)
+				})
+			}
+		})
+	}
+}
+
+func TestDiffViewXOffset(t *testing.T) {
+	for layoutName, layoutFunc := range LayoutFuncs {
+		t.Run(layoutName, func(t *testing.T) {
+			for xOffset := range 21 {
+				t.Run(fmt.Sprintf("XOffsetOf%02d", xOffset), func(t *testing.T) {
+					t.Parallel()
+
+					dv := diffview.New().
+						Before("main.go", TestDefaultBefore).
+						After("main.go", TestDefaultAfter).
+						Style(diffview.DefaultLightStyle()).
+						ChromaStyle(styles.Get("catppuccin-latte")).
+						Width(60).
+						XOffset(xOffset)
+					dv = layoutFunc(dv)
+
+					output := dv.String()
+					golden.RequireEqual(t, []byte(output))
+
+					assertLineWidth(t, 60, output)
+				})
+			}
+		})
+	}
+}
+
+func TestDiffViewYOffset(t *testing.T) {
+	for layoutName, layoutFunc := range LayoutFuncs {
+		t.Run(layoutName, func(t *testing.T) {
+			for yOffset := range 17 {
+				t.Run(fmt.Sprintf("YOffsetOf%02d", yOffset), func(t *testing.T) {
+					t.Parallel()
+
+					dv := diffview.New().
+						Before("main.go", TestMultipleHunksBefore).
+						After("main.go", TestMultipleHunksAfter).
+						Style(diffview.DefaultLightStyle()).
+						ChromaStyle(styles.Get("catppuccin-latte")).
+						Height(5).
+						YOffset(yOffset)
+					dv = layoutFunc(dv)
+
+					output := dv.String()
+					golden.RequireEqual(t, []byte(output))
+
+					assertHeight(t, 5, output)
+				})
+			}
+		})
+	}
+}
+
+func assertLineWidth(t *testing.T, expected int, output string) {
+	var lineWidth int
+	for line := range strings.SplitSeq(output, "\n") {
+		lineWidth = max(lineWidth, ansi.StringWidth(line))
+	}
+	if lineWidth != expected {
+		t.Errorf("expected output width to be == %d, got %d", expected, lineWidth)
+	}
+}
+
+func assertHeight(t *testing.T, expected int, output string) {
+	output = strings.TrimSuffix(output, "\n")
+	lines := strings.Count(output, "\n") + 1
+	if lines != expected {
+		t.Errorf("expected output height to be == %d, got %d", expected, lines)
+	}
+}

internal/exp/diffview/split.go 🔗

@@ -0,0 +1,74 @@
+package diffview
+
+import (
+	"slices"
+
+	"github.com/aymanbagabas/go-udiff"
+	"github.com/charmbracelet/x/exp/slice"
+)
+
+type splitHunk struct {
+	fromLine int
+	toLine   int
+	lines    []*splitLine
+}
+
+type splitLine struct {
+	before *udiff.Line
+	after  *udiff.Line
+}
+
+func hunkToSplit(h *udiff.Hunk) (sh splitHunk) {
+	lines := slices.Clone(h.Lines)
+	sh = splitHunk{
+		fromLine: h.FromLine,
+		toLine:   h.ToLine,
+		lines:    make([]*splitLine, 0, len(lines)),
+	}
+
+	for {
+		var ul udiff.Line
+		var ok bool
+		ul, lines, ok = slice.Shift(lines)
+		if !ok {
+			break
+		}
+
+		var sl splitLine
+
+		switch ul.Kind {
+
+		// For equal lines, add as is
+		case udiff.Equal:
+			sl.before = &ul
+			sl.after = &ul
+
+		// For inserted lines, set after and keep before as nil
+		case udiff.Insert:
+			sl.before = nil
+			sl.after = &ul
+
+		// For deleted lines, set before and loop over the next lines
+		// searching for the equivalent after line.
+		case udiff.Delete:
+			sl.before = &ul
+
+		inner:
+			for i, l := range lines {
+				switch l.Kind {
+				case udiff.Insert:
+					var ll udiff.Line
+					ll, lines, _ = slice.DeleteAt(lines, i)
+					sl.after = &ll
+					break inner
+				case udiff.Equal:
+					break inner
+				}
+			}
+		}
+
+		sh.lines = append(sh.lines, &sl)
+	}
+
+	return
+}

internal/exp/diffview/style.go 🔗

@@ -0,0 +1,124 @@
+package diffview
+
+import (
+	"github.com/charmbracelet/lipgloss/v2"
+	"github.com/charmbracelet/x/exp/charmtone"
+)
+
+// LineStyle defines the styles for a given line type in the diff view.
+type LineStyle struct {
+	LineNumber lipgloss.Style
+	Symbol     lipgloss.Style
+	Code       lipgloss.Style
+}
+
+// Style defines the overall style for the diff view, including styles for
+// different line types such as divider, missing, equal, insert, and delete
+// lines.
+type Style struct {
+	DividerLine LineStyle
+	MissingLine LineStyle
+	EqualLine   LineStyle
+	InsertLine  LineStyle
+	DeleteLine  LineStyle
+}
+
+// DefaultLightStyle provides a default light theme style for the diff view.
+func DefaultLightStyle() Style {
+	return Style{
+		DividerLine: LineStyle{
+			LineNumber: lipgloss.NewStyle().
+				Foreground(charmtone.Iron).
+				Background(charmtone.Thunder),
+			Code: lipgloss.NewStyle().
+				Foreground(charmtone.Oyster).
+				Background(charmtone.Anchovy),
+		},
+		MissingLine: LineStyle{
+			LineNumber: lipgloss.NewStyle().
+				Background(charmtone.Ash),
+			Code: lipgloss.NewStyle().
+				Background(charmtone.Ash),
+		},
+		EqualLine: LineStyle{
+			LineNumber: lipgloss.NewStyle().
+				Foreground(charmtone.Charcoal).
+				Background(charmtone.Ash),
+			Code: lipgloss.NewStyle().
+				Foreground(charmtone.Pepper).
+				Background(charmtone.Salt),
+		},
+		InsertLine: LineStyle{
+			LineNumber: lipgloss.NewStyle().
+				Foreground(charmtone.Turtle).
+				Background(lipgloss.Color("#c8e6c9")),
+			Symbol: lipgloss.NewStyle().
+				Foreground(charmtone.Turtle).
+				Background(lipgloss.Color("#e8f5e9")),
+			Code: lipgloss.NewStyle().
+				Foreground(charmtone.Pepper).
+				Background(lipgloss.Color("#e8f5e9")),
+		},
+		DeleteLine: LineStyle{
+			LineNumber: lipgloss.NewStyle().
+				Foreground(charmtone.Cherry).
+				Background(lipgloss.Color("#ffcdd2")),
+			Symbol: lipgloss.NewStyle().
+				Foreground(charmtone.Cherry).
+				Background(lipgloss.Color("#ffebee")),
+			Code: lipgloss.NewStyle().
+				Foreground(charmtone.Pepper).
+				Background(lipgloss.Color("#ffebee")),
+		},
+	}
+}
+
+// DefaultDarkStyle provides a default dark theme style for the diff view.
+func DefaultDarkStyle() Style {
+	return Style{
+		DividerLine: LineStyle{
+			LineNumber: lipgloss.NewStyle().
+				Foreground(charmtone.Smoke).
+				Background(charmtone.Sapphire),
+			Code: lipgloss.NewStyle().
+				Foreground(charmtone.Smoke).
+				Background(charmtone.Ox),
+		},
+		MissingLine: LineStyle{
+			LineNumber: lipgloss.NewStyle().
+				Background(charmtone.Charcoal),
+			Code: lipgloss.NewStyle().
+				Background(charmtone.Charcoal),
+		},
+		EqualLine: LineStyle{
+			LineNumber: lipgloss.NewStyle().
+				Foreground(charmtone.Ash).
+				Background(charmtone.Charcoal),
+			Code: lipgloss.NewStyle().
+				Foreground(charmtone.Salt).
+				Background(charmtone.Pepper),
+		},
+		InsertLine: LineStyle{
+			LineNumber: lipgloss.NewStyle().
+				Foreground(charmtone.Turtle).
+				Background(lipgloss.Color("#293229")),
+			Symbol: lipgloss.NewStyle().
+				Foreground(charmtone.Turtle).
+				Background(lipgloss.Color("#303a30")),
+			Code: lipgloss.NewStyle().
+				Foreground(charmtone.Salt).
+				Background(lipgloss.Color("#303a30")),
+		},
+		DeleteLine: LineStyle{
+			LineNumber: lipgloss.NewStyle().
+				Foreground(charmtone.Cherry).
+				Background(lipgloss.Color("#332929")),
+			Symbol: lipgloss.NewStyle().
+				Foreground(charmtone.Cherry).
+				Background(lipgloss.Color("#3a3030")),
+			Code: lipgloss.NewStyle().
+				Foreground(charmtone.Salt).
+				Background(lipgloss.Color("#3a3030")),
+		},
+	}
+}

internal/exp/diffview/testdata/TestDiffView/Split/CustomContextLines/DarkMode.golden 🔗

@@ -0,0 +1,16 @@
+  …   @@ -1,13 +1,15 @@                                 …                                                   
+  1   package main                                      1   package main                                    
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  8       fmt.Println(getContent())                     9       fmt.Println(getContent())                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      
+ 12 -     return "Hello, world!"                       13 +     content := strings.ToUpper("Hello, World!") 
+                                                       14 +     return content                              
+ 13   }                                                15   }                                               

internal/exp/diffview/testdata/TestDiffView/Split/CustomContextLines/LightMode.golden 🔗

@@ -0,0 +1,16 @@
+  …   @@ -1,13 +1,15 @@                                 …                                                   
+  1   package main                                      1   package main                                    
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  8       fmt.Println(getContent())                     9       fmt.Println(getContent())                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffView/Split/Default/DarkMode.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@                    …                                    
+  5   )                                  5   )                                
+  6                                      6                                    
+  7   func main() {                      7   func main() {                    
+  8 -     fmt.Println("Hello, world!")   8 +     content := "Hello, world!"   
+                                         9 +     fmt.Println(content)         
+  9   }                                 10   }                                

internal/exp/diffview/testdata/TestDiffView/Split/Default/LightMode.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@                    …                                    
+  5   )                                  5   )                                
+  6                                      6                                    
+  7   func main() {                      7   func main() {                    
+  8 -     fmt.Println("Hello, world!")   8 +     content := "Hello, world!"   
+                                         9 +     fmt.Println(content)         
+  9   }                                 10   }                                

internal/exp/diffview/testdata/TestDiffView/Split/LargeWidth/DarkMode.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                         …                                                         
+  2                                                           2                                                         
+  3   import (                                                3   import (                                              
+  4       "fmt"                                               4       "fmt"                                             
+                                                              5 +     "strings"                                         
+  5   )                                                       6   )                                                     
+  6                                                           7                                                         
+  7   func main() {                                           8   func main() {                                         
+  …   @@ -9,5 +10,6 @@                                        …                                                         
+  9   }                                                      10   }                                                     
+ 10                                                          11                                                         
+ 11   func getContent() string {                             12   func getContent() string {                            
+ 12 -     return "Hello, world!"                             13 +     content := strings.ToUpper("Hello, World!")       
+                                                             14 +     return content                                    
+ 13   }                                                      15   }                                                     

internal/exp/diffview/testdata/TestDiffView/Split/LargeWidth/LightMode.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                         …                                                         
+  2                                                           2                                                         
+  3   import (                                                3   import (                                              
+  4       "fmt"                                               4       "fmt"                                             
+                                                              5 +     "strings"                                         
+  5   )                                                       6   )                                                     
+  6                                                           7                                                         
+  7   func main() {                                           8   func main() {                                         
+  …   @@ -9,5 +10,6 @@                                        …                                                         
+  9   }                                                      10   }                                                     
+ 10                                                          11                                                         
+ 11   func getContent() string {                             12   func getContent() string {                            

internal/exp/diffview/testdata/TestDiffView/Split/MultipleHunks/DarkMode.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      
+ 12 -     return "Hello, world!"                       13 +     content := strings.ToUpper("Hello, World!") 
+                                                       14 +     return content                              
+ 13   }                                                15   }                                               

internal/exp/diffview/testdata/TestDiffView/Split/MultipleHunks/LightMode.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffView/Split/Narrow/DarkMode.golden 🔗

@@ -0,0 +1,4 @@
+ …   @@ -1,3 +1,3 @@    …                     
+ 1 - a                  1 + d                 
+ 2 - b                  2 + e                 
+ 3 - c                  3 + f                 

internal/exp/diffview/testdata/TestDiffView/Split/Narrow/LightMode.golden 🔗

@@ -0,0 +1,4 @@
+ …   @@ -1,3 +1,3 @@    …                     
+ 1 - a                  1 + d                 
+ 2 - b                  2 + e                 
+ 3 - c                  3 + f                 

internal/exp/diffview/testdata/TestDiffView/Split/NoLineNumbers/DarkMode.golden 🔗

@@ -0,0 +1,7 @@
+  @@ -5,5 +5,6 @@                                                     
+  )                                  )                                
+                                                                      
+  func main() {                      func main() {                    
+-     fmt.Println("Hello, world!") +     content := "Hello, world!"   
+                                   +     fmt.Println(content)         
+  }                                  }                                

internal/exp/diffview/testdata/TestDiffView/Split/NoLineNumbers/LightMode.golden 🔗

@@ -0,0 +1,7 @@
+  @@ -5,5 +5,6 @@                                                     
+  )                                  )                                
+                                                                      
+  func main() {                      func main() {                    
+-     fmt.Println("Hello, world!") +     content := "Hello, world!"   
+                                   +     fmt.Println(content)         
+  }                                  }                                

internal/exp/diffview/testdata/TestDiffView/Split/NoSyntaxHighlight/DarkMode.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      
+ 12 -     return "Hello, world!"                       13 +     content := strings.ToUpper("Hello, World!") 
+                                                       14 +     return content                              
+ 13   }                                                15   }                                               

internal/exp/diffview/testdata/TestDiffView/Split/NoSyntaxHighlight/LightMode.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      
+ 12 -     return "Hello, world!"                       13 +     content := strings.ToUpper("Hello, World!") 
+                                                       14 +     return content                              
+ 13   }                                                15   }                                               

internal/exp/diffview/testdata/TestDiffView/Split/SmallWidth/DarkMode.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 …  …                 
+  2                   2                 
+  3   import (        3   import (      
+  4       "fmt"       4       "fmt"     
+                      5 +     "strings" 
+  5   )               6   )             
+  6                   7                 
+  7   func main() {   8   func main() { 
+  …   @@ -9,5 +10,6…  …                 
+  9   }              10   }             
+ 10                  11                 
+ 11   func getConte… 12   func getConte…
+ 12 -     return "H… 13 +     content :…
+                     14 +     return co…
+ 13   }              15   }             

internal/exp/diffview/testdata/TestDiffView/Split/SmallWidth/LightMode.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 …  …                 
+  2                   2                 
+  3   import (        3   import (      
+  4       "fmt"       4       "fmt"     
+                      5 +     "strings" 
+  5   )               6   )             
+  6                   7                 
+  7   func main() {   8   func main() { 
+  …   @@ -9,5 +10,6…  …                 
+  9   }              10   }             
+ 10                  11                 
+ 11   func getConte… 12   func getConte…
+ 12 -     return "H… 13 +     content :…
+                     14 +     return co…
+ 13   }              15   }             

internal/exp/diffview/testdata/TestDiffView/Unified/CustomContextLines/DarkMode.golden 🔗

@@ -0,0 +1,17 @@
+  …   …   @@ -1,13 +1,15 @@                               
+  1   1   package main                                    
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  8   9       fmt.Println(getContent())                   
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               

internal/exp/diffview/testdata/TestDiffView/Unified/CustomContextLines/LightMode.golden 🔗

@@ -0,0 +1,17 @@
+  …   …   @@ -1,13 +1,15 @@                               
+  1   1   package main                                    
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  8   9       fmt.Println(getContent())                   
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               

internal/exp/diffview/testdata/TestDiffView/Unified/Default/DarkMode.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                  
+  5   5   )                                
+  6   6                                    
+  7   7   func main() {                    
+  8     -     fmt.Println("Hello, world!") 
+      8 +     content := "Hello, world!"   
+      9 +     fmt.Println(content)         
+  9  10   }                                

internal/exp/diffview/testdata/TestDiffView/Unified/Default/LightMode.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                  
+  5   5   )                                
+  6   6                                    
+  7   7   func main() {                    
+  8     -     fmt.Println("Hello, world!") 
+      8 +     content := "Hello, world!"   
+      9 +     fmt.Println(content)         
+  9  10   }                                

internal/exp/diffview/testdata/TestDiffView/Unified/LargeWidth/DarkMode.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                                                                               
+  2   2                                                                                                                 
+  3   3   import (                                                                                                      
+  4   4       "fmt"                                                                                                     
+      5 +     "strings"                                                                                                 
+  5   6   )                                                                                                             
+  6   7                                                                                                                 
+  7   8   func main() {                                                                                                 
+  …   …   @@ -9,5 +10,6 @@                                                                                              
+  9  10   }                                                                                                             
+ 10  11                                                                                                                 
+ 11  12   func getContent() string {                                                                                    
+ 12     -     return "Hello, world!"                                                                                    
+     13 +     content := strings.ToUpper("Hello, World!")                                                               
+     14 +     return content                                                                                            
+ 13  15   }                                                                                                             

internal/exp/diffview/testdata/TestDiffView/Unified/LargeWidth/LightMode.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                                                                               
+  2   2                                                                                                                 
+  3   3   import (                                                                                                      
+  4   4       "fmt"                                                                                                     
+      5 +     "strings"                                                                                                 
+  5   6   )                                                                                                             
+  6   7                                                                                                                 
+  7   8   func main() {                                                                                                 
+  …   …   @@ -9,5 +10,6 @@                                                                                              
+  9  10   }                                                                                                             
+ 10  11                                                                                                                 
+ 11  12   func getContent() string {                                                                                    
+ 12     -     return "Hello, world!"                                                                                    
+     13 +     content := strings.ToUpper("Hello, World!")                                                               
+     14 +     return content                                                                                            
+ 13  15   }                                                                                                             

internal/exp/diffview/testdata/TestDiffView/Unified/MultipleHunks/DarkMode.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               

internal/exp/diffview/testdata/TestDiffView/Unified/MultipleHunks/LightMode.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               

internal/exp/diffview/testdata/TestDiffView/Unified/Narrow/DarkMode.golden 🔗

@@ -0,0 +1,7 @@
+ …  …   @@ -1,3 +1,3 @@   
+ 1    - a                 
+ 2    - b                 
+ 3    - c                 
+    1 + d                 
+    2 + e                 
+    3 + f                 

internal/exp/diffview/testdata/TestDiffView/Unified/Narrow/LightMode.golden 🔗

@@ -0,0 +1,7 @@
+ …  …   @@ -1,3 +1,3 @@   
+ 1    - a                 
+ 2    - b                 
+ 3    - c                 
+    1 + d                 
+    2 + e                 
+    3 + f                 

internal/exp/diffview/testdata/TestDiffView/Unified/NoLineNumbers/DarkMode.golden 🔗

@@ -0,0 +1,8 @@
+  @@ -5,5 +5,6 @@                  
+  )                                
+                                   
+  func main() {                    
+-     fmt.Println("Hello, world!") 
++     content := "Hello, world!"   
++     fmt.Println(content)         
+  }                                

internal/exp/diffview/testdata/TestDiffView/Unified/NoLineNumbers/LightMode.golden 🔗

@@ -0,0 +1,8 @@
+  @@ -5,5 +5,6 @@                  
+  )                                
+                                   
+  func main() {                    
+-     fmt.Println("Hello, world!") 
++     content := "Hello, world!"   
++     fmt.Println(content)         
+  }                                

internal/exp/diffview/testdata/TestDiffView/Unified/NoSyntaxHighlight/DarkMode.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               

internal/exp/diffview/testdata/TestDiffView/Unified/NoSyntaxHighlight/LightMode.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               

internal/exp/diffview/testdata/TestDiffView/Unified/SmallWidth/DarkMode.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@               
+  2   2                                 
+  3   3   import (                      
+  4   4       "fmt"                     
+      5 +     "strings"                 
+  5   6   )                             
+  6   7                                 
+  7   8   func main() {                 
+  …   …   @@ -9,5 +10,6 @@              
+  9  10   }                             
+ 10  11                                 
+ 11  12   func getContent() string {    
+ 12     -     return "Hello, world!"    
+     13 +     content := strings.ToUppe…
+     14 +     return content            
+ 13  15   }                             

internal/exp/diffview/testdata/TestDiffView/Unified/SmallWidth/LightMode.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@               
+  2   2                                 
+  3   3   import (                      
+  4   4       "fmt"                     
+      5 +     "strings"                 
+  5   6   )                             
+  6   7                                 
+  7   8   func main() {                 
+  …   …   @@ -9,5 +10,6 @@              
+  9  10   }                             
+ 10  11                                 
+ 11  12   func getContent() string {    
+ 12     -     return "Hello, world!"    
+     13 +     content := strings.ToUppe…
+     14 +     return content            
+ 13  15   }                             

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf001.golden 🔗

@@ -0,0 +1 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf002.golden 🔗

@@ -0,0 +1,2 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf003.golden 🔗

@@ -0,0 +1,3 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf004.golden 🔗

@@ -0,0 +1,4 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf005.golden 🔗

@@ -0,0 +1,5 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf006.golden 🔗

@@ -0,0 +1,6 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf007.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf008.golden 🔗

@@ -0,0 +1,8 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf009.golden 🔗

@@ -0,0 +1,9 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf010.golden 🔗

@@ -0,0 +1,10 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf011.golden 🔗

@@ -0,0 +1,11 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf012.golden 🔗

@@ -0,0 +1,12 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf013.golden 🔗

@@ -0,0 +1,13 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf014.golden 🔗

@@ -0,0 +1,14 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf015.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf016.golden 🔗

@@ -0,0 +1,16 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf017.golden 🔗

@@ -0,0 +1,17 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf018.golden 🔗

@@ -0,0 +1,18 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf019.golden 🔗

@@ -0,0 +1,19 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewHeight/Split/HeightOf020.golden 🔗

@@ -0,0 +1,20 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf002.golden 🔗

@@ -0,0 +1,2 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf003.golden 🔗

@@ -0,0 +1,3 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf004.golden 🔗

@@ -0,0 +1,4 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf005.golden 🔗

@@ -0,0 +1,5 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf006.golden 🔗

@@ -0,0 +1,6 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf007.golden 🔗

@@ -0,0 +1,7 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf008.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf009.golden 🔗

@@ -0,0 +1,9 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf010.golden 🔗

@@ -0,0 +1,10 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf011.golden 🔗

@@ -0,0 +1,11 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf012.golden 🔗

@@ -0,0 +1,12 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf013.golden 🔗

@@ -0,0 +1,13 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf014.golden 🔗

@@ -0,0 +1,14 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf015.golden 🔗

@@ -0,0 +1,15 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf016.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf017.golden 🔗

@@ -0,0 +1,17 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               
+                                                          

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf018.golden 🔗

@@ -0,0 +1,18 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               
+                                                          
+                                                          

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf019.golden 🔗

@@ -0,0 +1,19 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               
+                                                          
+                                                          
+                                                          

internal/exp/diffview/testdata/TestDiffViewHeight/Unified/HeightOf020.golden 🔗

@@ -0,0 +1,20 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               
+                                                          
+                                                          
+                                                          
+                                                          

internal/exp/diffview/testdata/TestDiffViewTabs/Split.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                       …                                                       
+  2                                                         2                                                       
+  3   import (                                              3   import (                                            
+  4           "fmt"                                         4           "fmt"                                       
+                                                            5 +         "strings"                                   
+  5   )                                                     6   )                                                   
+  6                                                         7                                                       
+  7   func main() {                                         8   func main() {                                       
+  …   @@ -9,5 +10,6 @@                                      …                                                       
+  9   }                                                    10   }                                                   
+ 10                                                        11                                                       
+ 11   func getContent() string {                           12   func getContent() string {                          

internal/exp/diffview/testdata/TestDiffViewTabs/Unified.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                     
+  2   2                                                       
+  3   3   import (                                            
+  4   4           "fmt"                                       
+      5 +         "strings"                                   
+  5   6   )                                                   
+  6   7                                                       
+  7   8   func main() {                                       
+  …   …   @@ -9,5 +10,6 @@                                    
+  9  10   }                                                   
+ 10  11                                                       
+ 11  12   func getContent() string {                          
+ 12     -         return "Hello, world!"                      
+     13 +         content := strings.ToUpper("Hello, World!") 
+     14 +         return content                              
+ 13  15   }                                                   

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf001.golden 🔗

@@ -0,0 +1,15 @@
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf002.golden 🔗

@@ -0,0 +1,15 @@
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 1
+ 1
+ 1
+  
+ 1

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf003.golden 🔗

@@ -0,0 +1,15 @@
+  …
+  2
+  3
+  4
+   
+  5
+  6
+  7
+  …
+  9
+ 10
+ 11
+ 12
+   
+ 13

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf004.golden 🔗

@@ -0,0 +1,15 @@
+  … 
+  2 
+  3 
+  4 
+    
+  5 
+  6 
+  7 
+  … 
+  9 
+ 10 
+ 11 
+ 12 
+    
+ 13 

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf005.golden 🔗

@@ -0,0 +1,15 @@
+  …  
+  2  
+  3  
+  4  
+     
+  5  
+  6  
+  7  
+  …  
+  9  
+ 10  
+ 11  
+ 12 -
+     
+ 13  

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf006.golden 🔗

@@ -0,0 +1,15 @@
+  …   
+  2   
+  3   
+  4   
+      
+  5   
+  6   
+  7   
+  …   
+  9   
+ 10   
+ 11   
+ 12 - 
+      
+ 13   

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf007.golden 🔗

@@ -0,0 +1,15 @@
+  …   …
+  2    
+  3    
+  4    
+       
+  5    
+  6    
+  7    
+  …   …
+  9    
+ 10    
+ 11    
+ 12 -  
+       
+ 13    

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf008.golden 🔗

@@ -0,0 +1,15 @@
+  …   … 
+  2     
+  3     
+  4     
+        
+  5     
+  6     
+  7     
+  …   … 
+  9    1
+ 10    1
+ 11    1
+ 12 -  1
+       1
+ 13    1

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf009.golden 🔗

@@ -0,0 +1,15 @@
+  … …  … 
+  2    2 
+  3    3 
+  4    4 
+       5 
+  5    6 
+  6    7 
+  7    8 
+  … …  … 
+  9   10 
+ 10   11 
+ 11   12 
+ 12 - 13 
+      14 
+ 13   15 

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf010.golden 🔗

@@ -0,0 +1,15 @@
+  … …  …  
+  2    2  
+  3    3  
+  4    4  
+       5 +
+  5    6  
+  6    7  
+  7    8  
+  … …  …  
+  9   10  
+ 10   11  
+ 11   12  
+ 12 - 13 +
+      14 +
+ 13   15  

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf011.golden 🔗

@@ -0,0 +1,15 @@
+  …  …  …  
+  2     2  
+  3     3  
+  4     4  
+        5 +
+  5     6  
+  6     7  
+  7     8  
+  …  …  …  
+  9    10  
+ 10    11  
+ 11    12  
+ 12 -  13 +
+       14 +
+ 13    15  

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf012.golden 🔗

@@ -0,0 +1,15 @@
+  …  …  …   
+  2     2   
+  3     3   
+  4     4   
+        5 + 
+  5     6   
+  6     7   
+  7     8   
+  …  …  …   
+  9    10   
+ 10    11   
+ 11    12   
+ 12 -  13 + 
+       14 + 
+ 13    15   

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf013.golden 🔗

@@ -0,0 +1,15 @@
+  …  …  …    
+  2     2    
+  3     3    
+  4     4    
+        5 +  
+  5     6    
+  6     7    
+  7     8    
+  …  …  …    
+  9    10    
+ 10    11    
+ 11    12    
+ 12 -  13 +  
+       14 +  
+ 13    15    

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf014.golden 🔗

@@ -0,0 +1,15 @@
+  …   …  …    
+  2      2    
+  3   …  3   …
+  4   …  4   …
+         5 + …
+  5   )  6   )
+  6      7    
+  7   …  8   …
+  …   …  …    
+  9   } 10   }
+ 10     11    
+ 11   … 12   …
+ 12 - … 13 + …
+        14 + …
+ 13   } 15   }

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf015.golden 🔗

@@ -0,0 +1,15 @@
+  …   …  …     
+  2      2     
+  3   …  3   … 
+  4   …  4   … 
+         5 + … 
+  5   )  6   ) 
+  6      7     
+  7   …  8   … 
+  …   …  …     
+  9   } 10   } 
+ 10     11     
+ 11   … 12   … 
+ 12 - … 13 + … 
+        14 + … 
+ 13   } 15   } 

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf016.golden 🔗

@@ -0,0 +1,15 @@
+  …   @…  …     
+  2       2     
+  3   i…  3   i…
+  4    …  4    …
+          5 +  …
+  5   )   6   ) 
+  6       7     
+  7   f…  8   f…
+  …   @…  …     
+  9   }  10   } 
+ 10      11     
+ 11   f… 12   f…
+ 12 -  … 13 +  …
+         14 +  …
+ 13   }  15   } 

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf017.golden 🔗

@@ -0,0 +1,15 @@
+  …   @…  …      
+  2       2      
+  3   i…  3   i… 
+  4    …  4    … 
+          5 +  … 
+  5   )   6   )  
+  6       7      
+  7   f…  8   f… 
+  …   @…  …      
+  9   }  10   }  
+ 10      11      
+ 11   f… 12   f… 
+ 12 -  … 13 +  … 
+         14 +  … 
+ 13   }  15   }  

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf018.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@…  …      
+  2        2      
+  3   im…  3   im…
+  4     …  4     …
+           5 +   …
+  5   )    6   )  
+  6        7      
+  7   fu…  8   fu…
+  …   @@…  …      
+  9   }   10   }  
+ 10       11      
+ 11   fu… 12   fu…
+ 12 -   … 13 +   …
+          14 +   …
+ 13   }   15   }  

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf019.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@…  …       
+  2        2       
+  3   im…  3   im… 
+  4     …  4     … 
+           5 +   … 
+  5   )    6   )   
+  6        7       
+  7   fu…  8   fu… 
+  …   @@…  …       
+  9   }   10   }   
+ 10       11       
+ 11   fu… 12   fu… 
+ 12 -   … 13 +   … 
+          14 +   … 
+ 13   }   15   }   

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf020.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ …  …       
+  2         2       
+  3   imp…  3   imp…
+  4      …  4      …
+            5 +    …
+  5   )     6   )   
+  6         7       
+  7   fun…  8   fun…
+  …   @@ …  …       
+  9   }    10   }   
+ 10        11       
+ 11   fun… 12   fun…
+ 12 -    … 13 +    …
+           14 +    …
+ 13   }    15   }   

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf021.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ …  …        
+  2         2        
+  3   imp…  3   imp… 
+  4      …  4      … 
+            5 +    … 
+  5   )     6   )    
+  6         7        
+  7   fun…  8   fun… 
+  …   @@ …  …        
+  9   }    10   }    
+ 10        11        
+ 11   fun… 12   fun… 
+ 12 -    … 13 +    … 
+           14 +    … 
+ 13   }    15   }    

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf022.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -…  …        
+  2          2        
+  3   impo…  3   impo…
+  4       …  4       …
+             5 +     …
+  5   )      6   )    
+  6          7        
+  7   func…  8   func…
+  …   @@ -…  …        
+  9   }     10   }    
+ 10         11        
+ 11   func… 12   func…
+ 12 -     … 13 +     …
+            14 +     …
+ 13   }     15   }    

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf023.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -…  …         
+  2          2         
+  3   impo…  3   impo… 
+  4       …  4       … 
+             5 +     … 
+  5   )      6   )     
+  6          7         
+  7   func…  8   func… 
+  …   @@ -…  …         
+  9   }     10   }     
+ 10         11         
+ 11   func… 12   func… 
+ 12 -     … 13 +     … 
+            14 +     … 
+ 13   }     15   }     

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf024.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2…  …         
+  2           2         
+  3   impor…  3   impor…
+  4       "…  4       "…
+              5 +     "…
+  5   )       6   )     
+  6           7         
+  7   func …  8   func …
+  …   @@ -9…  …         
+  9   }      10   }     
+ 10          11         
+ 11   func … 12   func …
+ 12 -     r… 13 +     c…
+             14 +     r…
+ 13   }      15   }     

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf025.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2…  …          
+  2           2          
+  3   impor…  3   impor… 
+  4       "…  4       "… 
+              5 +     "… 
+  5   )       6   )      
+  6           7          
+  7   func …  8   func … 
+  …   @@ -9…  …          
+  9   }      10   }      
+ 10          11          
+ 11   func … 12   func … 
+ 12 -     r… 13 +     c… 
+             14 +     r… 
+ 13   }      15   }      

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf026.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,…  …          
+  2            2          
+  3   import…  3   import…
+  4       "f…  4       "f…
+               5 +     "s…
+  5   )        6   )      
+  6            7          
+  7   func m…  8   func m…
+  …   @@ -9,…  …          
+  9   }       10   }      
+ 10           11          
+ 11   func g… 12   func g…
+ 12 -     re… 13 +     co…
+              14 +     re…
+ 13   }       15   }      

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf027.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,…  …           
+  2            2           
+  3   import…  3   import… 
+  4       "f…  4       "f… 
+               5 +     "s… 
+  5   )        6   )       
+  6            7           
+  7   func m…  8   func m… 
+  …   @@ -9,…  …           
+  9   }       10   }       
+ 10           11           
+ 11   func g… 12   func g… 
+ 12 -     re… 13 +     co… 
+              14 +     re… 
+ 13   }       15   }       

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf028.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6…  …           
+  2             2           
+  3   import (  3   import (
+  4       "fm…  4       "fm…
+                5 +     "st…
+  5   )         6   )       
+  6             7           
+  7   func ma…  8   func ma…
+  …   @@ -9,5…  …           
+  9   }        10   }       
+ 10            11           
+ 11   func ge… 12   func ge…
+ 12 -     ret… 13 +     con…
+               14 +     ret…
+ 13   }        15   }       

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf029.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6…  …            
+  2             2            
+  3   import (  3   import ( 
+  4       "fm…  4       "fm… 
+                5 +     "st… 
+  5   )         6   )        
+  6             7            
+  7   func ma…  8   func ma… 
+  …   @@ -9,5…  …            
+  9   }        10   }        
+ 10            11            
+ 11   func ge… 12   func ge… 
+ 12 -     ret… 13 +     con… 
+               14 +     ret… 
+ 13   }        15   }        

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf030.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 …  …            
+  2              2            
+  3   import (   3   import ( 
+  4       "fmt"  4       "fmt"
+                 5 +     "str…
+  5   )          6   )        
+  6              7            
+  7   func mai…  8   func mai…
+  …   @@ -9,5 …  …            
+  9   }         10   }        
+ 10             11            
+ 11   func get… 12   func get…
+ 12 -     retu… 13 +     cont…
+                14 +     retu…
+ 13   }         15   }        

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf031.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 …  …             
+  2              2             
+  3   import (   3   import (  
+  4       "fmt"  4       "fmt" 
+                 5 +     "str… 
+  5   )          6   )         
+  6              7             
+  7   func mai…  8   func mai… 
+  …   @@ -9,5 …  …             
+  9   }         10   }         
+ 10             11             
+ 11   func get… 12   func get… 
+ 12 -     retu… 13 +     cont… 
+                14 +     retu… 
+ 13   }         15   }         

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf032.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +…  …             
+  2               2             
+  3   import (    3   import (  
+  4       "fmt"   4       "fmt" 
+                  5 +     "stri…
+  5   )           6   )         
+  6               7             
+  7   func main…  8   func main…
+  …   @@ -9,5 +…  …             
+  9   }          10   }         
+ 10              11             
+ 11   func getC… 12   func getC…
+ 12 -     retur… 13 +     conte…
+                 14 +     retur…
+ 13   }          15   }         

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf033.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +…  …              
+  2               2              
+  3   import (    3   import (   
+  4       "fmt"   4       "fmt"  
+                  5 +     "stri… 
+  5   )           6   )          
+  6               7              
+  7   func main…  8   func main… 
+  …   @@ -9,5 +…  …              
+  9   }          10   }          
+ 10              11              
+ 11   func getC… 12   func getC… 
+ 12 -     retur… 13 +     conte… 
+                 14 +     retur… 
+ 13   }          15   }          

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf034.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2…  …              
+  2                2              
+  3   import (     3   import (   
+  4       "fmt"    4       "fmt"  
+                   5 +     "strin…
+  5   )            6   )          
+  6                7              
+  7   func main(…  8   func main(…
+  …   @@ -9,5 +1…  …              
+  9   }           10   }          
+ 10               11              
+ 11   func getCo… 12   func getCo…
+ 12 -     return… 13 +     conten…
+                  14 +     return…
+ 13   }           15   }          

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf035.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2…  …               
+  2                2               
+  3   import (     3   import (    
+  4       "fmt"    4       "fmt"   
+                   5 +     "strin… 
+  5   )            6   )           
+  6                7               
+  7   func main(…  8   func main(… 
+  …   @@ -9,5 +1…  …               
+  9   }           10   }           
+ 10               11               
+ 11   func getCo… 12   func getCo… 
+ 12 -     return… 13 +     conten… 
+                  14 +     return… 
+ 13   }           15   }           

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf036.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,…  …               
+  2                 2               
+  3   import (      3   import (    
+  4       "fmt"     4       "fmt"   
+                    5 +     "string…
+  5   )             6   )           
+  6                 7               
+  7   func main()…  8   func main()…
+  …   @@ -9,5 +10…  …               
+  9   }            10   }           
+ 10                11               
+ 11   func getCon… 12   func getCon…
+ 12 -     return … 13 +     content…
+                   14 +     return …
+ 13   }            15   }           

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf037.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,…  …                
+  2                 2                
+  3   import (      3   import (     
+  4       "fmt"     4       "fmt"    
+                    5 +     "string… 
+  5   )             6   )            
+  6                 7                
+  7   func main()…  8   func main()… 
+  …   @@ -9,5 +10…  …                
+  9   }            10   }            
+ 10                11                
+ 11   func getCon… 12   func getCon… 
+ 12 -     return … 13 +     content… 
+                   14 +     return … 
+ 13   }            15   }            

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf038.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7…  …                
+  2                  2                
+  3   import (       3   import (     
+  4       "fmt"      4       "fmt"    
+                     5 +     "strings"
+  5   )              6   )            
+  6                  7                
+  7   func main() {  8   func main() {
+  …   @@ -9,5 +10,…  …                
+  9   }             10   }            
+ 10                 11                
+ 11   func getCont… 12   func getCont…
+ 12 -     return "… 13 +     content …
+                    14 +     return c…
+ 13   }             15   }            

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf039.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7…  …                 
+  2                  2                 
+  3   import (       3   import (      
+  4       "fmt"      4       "fmt"     
+                     5 +     "strings" 
+  5   )              6   )             
+  6                  7                 
+  7   func main() {  8   func main() { 
+  …   @@ -9,5 +10,…  …                 
+  9   }             10   }             
+ 10                 11                 
+ 11   func getCont… 12   func getCont… 
+ 12 -     return "… 13 +     content … 
+                    14 +     return c… 
+ 13   }             15   }             

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf040.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 …  …                 
+  2                   2                 
+  3   import (        3   import (      
+  4       "fmt"       4       "fmt"     
+                      5 +     "strings" 
+  5   )               6   )             
+  6                   7                 
+  7   func main() {   8   func main() { 
+  …   @@ -9,5 +10,6…  …                 
+  9   }              10   }             
+ 10                  11                 
+ 11   func getConte… 12   func getConte…
+ 12 -     return "H… 13 +     content :…
+                     14 +     return co…
+ 13   }              15   }             

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf041.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 …  …                  
+  2                   2                  
+  3   import (        3   import (       
+  4       "fmt"       4       "fmt"      
+                      5 +     "strings"  
+  5   )               6   )              
+  6                   7                  
+  7   func main() {   8   func main() {  
+  …   @@ -9,5 +10,6…  …                  
+  9   }              10   }              
+ 10                  11                  
+ 11   func getConte… 12   func getConte… 
+ 12 -     return "H… 13 +     content :… 
+                     14 +     return co… 
+ 13   }              15   }              

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf042.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @…  …                  
+  2                    2                  
+  3   import (         3   import (       
+  4       "fmt"        4       "fmt"      
+                       5 +     "strings"  
+  5   )                6   )              
+  6                    7                  
+  7   func main() {    8   func main() {  
+  …   @@ -9,5 +10,6 …  …                  
+  9   }               10   }              
+ 10                   11                  
+ 11   func getConten… 12   func getConten…
+ 12 -     return "He… 13 +     content :=…
+                      14 +     return con…
+ 13   }               15   }              

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf043.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @…  …                   
+  2                    2                   
+  3   import (         3   import (        
+  4       "fmt"        4       "fmt"       
+                       5 +     "strings"   
+  5   )                6   )               
+  6                    7                   
+  7   func main() {    8   func main() {   
+  …   @@ -9,5 +10,6 …  …                   
+  9   }               10   }               
+ 10                   11                   
+ 11   func getConten… 12   func getConten… 
+ 12 -     return "He… 13 +     content :=… 
+                      14 +     return con… 
+ 13   }               15   }               

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf044.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@   …                   
+  2                     2                   
+  3   import (          3   import (        
+  4       "fmt"         4       "fmt"       
+                        5 +     "strings"   
+  5   )                 6   )               
+  6                     7                   
+  7   func main() {     8   func main() {   
+  …   @@ -9,5 +10,6 @…  …                   
+  9   }                10   }               
+ 10                    11                   
+ 11   func getContent… 12   func getContent…
+ 12 -     return "Hel… 13 +     content := …
+                       14 +     return cont…
+ 13   }                15   }               

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf045.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@   …                    
+  2                     2                    
+  3   import (          3   import (         
+  4       "fmt"         4       "fmt"        
+                        5 +     "strings"    
+  5   )                 6   )                
+  6                     7                    
+  7   func main() {     8   func main() {    
+  …   @@ -9,5 +10,6 @…  …                    
+  9   }                10   }                
+ 10                    11                    
+ 11   func getContent… 12   func getContent… 
+ 12 -     return "Hel… 13 +     content := … 
+                       14 +     return cont… 
+ 13   }                15   }                

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf046.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@    …                    
+  2                      2                    
+  3   import (           3   import (         
+  4       "fmt"          4       "fmt"        
+                         5 +     "strings"    
+  5   )                  6   )                
+  6                      7                    
+  7   func main() {      8   func main() {    
+  …   @@ -9,5 +10,6 @@   …                    
+  9   }                 10   }                
+ 10                     11                    
+ 11   func getContent(… 12   func getContent(…
+ 12 -     return "Hell… 13 +     content := s…
+                        14 +     return conte…
+ 13   }                 15   }                

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf047.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@    …                     
+  2                      2                     
+  3   import (           3   import (          
+  4       "fmt"          4       "fmt"         
+                         5 +     "strings"     
+  5   )                  6   )                 
+  6                      7                     
+  7   func main() {      8   func main() {     
+  …   @@ -9,5 +10,6 @@   …                     
+  9   }                 10   }                 
+ 10                     11                     
+ 11   func getContent(… 12   func getContent(… 
+ 12 -     return "Hell… 13 +     content := s… 
+                        14 +     return conte… 
+ 13   }                 15   }                 

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf048.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@     …                     
+  2                       2                     
+  3   import (            3   import (          
+  4       "fmt"           4       "fmt"         
+                          5 +     "strings"     
+  5   )                   6   )                 
+  6                       7                     
+  7   func main() {       8   func main() {     
+  …   @@ -9,5 +10,6 @@    …                     
+  9   }                  10   }                 
+ 10                      11                     
+ 11   func getContent()… 12   func getContent()…
+ 12 -     return "Hello… 13 +     content := st…
+                         14 +     return content
+ 13   }                  15   }                 

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf049.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@     …                      
+  2                       2                      
+  3   import (            3   import (           
+  4       "fmt"           4       "fmt"          
+                          5 +     "strings"      
+  5   )                   6   )                  
+  6                       7                      
+  7   func main() {       8   func main() {      
+  …   @@ -9,5 +10,6 @@    …                      
+  9   }                  10   }                  
+ 10                      11                      
+ 11   func getContent()… 12   func getContent()… 
+ 12 -     return "Hello… 13 +     content := st… 
+                         14 +     return content 
+ 13   }                  15   }                  

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf050.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@      …                      
+  2                        2                      
+  3   import (             3   import (           
+  4       "fmt"            4       "fmt"          
+                           5 +     "strings"      
+  5   )                    6   )                  
+  6                        7                      
+  7   func main() {        8   func main() {      
+  …   @@ -9,5 +10,6 @@     …                      
+  9   }                   10   }                  
+ 10                       11                      
+ 11   func getContent() … 12   func getContent() …
+ 12 -     return "Hello,… 13 +     content := str…
+                          14 +     return content 
+ 13   }                   15   }                  

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf051.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@      …                       
+  2                        2                       
+  3   import (             3   import (            
+  4       "fmt"            4       "fmt"           
+                           5 +     "strings"       
+  5   )                    6   )                   
+  6                        7                       
+  7   func main() {        8   func main() {       
+  …   @@ -9,5 +10,6 @@     …                       
+  9   }                   10   }                   
+ 10                       11                       
+ 11   func getContent() … 12   func getContent() … 
+ 12 -     return "Hello,… 13 +     content := str… 
+                          14 +     return content  
+ 13   }                   15   }                   

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf052.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@       …                       
+  2                         2                       
+  3   import (              3   import (            
+  4       "fmt"             4       "fmt"           
+                            5 +     "strings"       
+  5   )                     6   )                   
+  6                         7                       
+  7   func main() {         8   func main() {       
+  …   @@ -9,5 +10,6 @@      …                       
+  9   }                    10   }                   
+ 10                        11                       
+ 11   func getContent() s… 12   func getContent() s…
+ 12 -     return "Hello, … 13 +     content := stri…
+                           14 +     return content  
+ 13   }                    15   }                   

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf053.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@       …                        
+  2                         2                        
+  3   import (              3   import (             
+  4       "fmt"             4       "fmt"            
+                            5 +     "strings"        
+  5   )                     6   )                    
+  6                         7                        
+  7   func main() {         8   func main() {        
+  …   @@ -9,5 +10,6 @@      …                        
+  9   }                    10   }                    
+ 10                        11                        
+ 11   func getContent() s… 12   func getContent() s… 
+ 12 -     return "Hello, … 13 +     content := stri… 
+                           14 +     return content   
+ 13   }                    15   }                    

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf054.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@        …                        
+  2                          2                        
+  3   import (               3   import (             
+  4       "fmt"              4       "fmt"            
+                             5 +     "strings"        
+  5   )                      6   )                    
+  6                          7                        
+  7   func main() {          8   func main() {        
+  …   @@ -9,5 +10,6 @@       …                        
+  9   }                     10   }                    
+ 10                         11                        
+ 11   func getContent() st… 12   func getContent() st…
+ 12 -     return "Hello, w… 13 +     content := strin…
+                            14 +     return content   
+ 13   }                     15   }                    

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf055.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@        …                         
+  2                          2                         
+  3   import (               3   import (              
+  4       "fmt"              4       "fmt"             
+                             5 +     "strings"         
+  5   )                      6   )                     
+  6                          7                         
+  7   func main() {          8   func main() {         
+  …   @@ -9,5 +10,6 @@       …                         
+  9   }                     10   }                     
+ 10                         11                         
+ 11   func getContent() st… 12   func getContent() st… 
+ 12 -     return "Hello, w… 13 +     content := strin… 
+                            14 +     return content    
+ 13   }                     15   }                     

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf056.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@         …                         
+  2                           2                         
+  3   import (                3   import (              
+  4       "fmt"               4       "fmt"             
+                              5 +     "strings"         
+  5   )                       6   )                     
+  6                           7                         
+  7   func main() {           8   func main() {         
+  …   @@ -9,5 +10,6 @@        …                         
+  9   }                      10   }                     
+ 10                          11                         
+ 11   func getContent() str… 12   func getContent() str…
+ 12 -     return "Hello, wo… 13 +     content := string…
+                             14 +     return content    
+ 13   }                      15   }                     

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf057.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@         …                          
+  2                           2                          
+  3   import (                3   import (               
+  4       "fmt"               4       "fmt"              
+                              5 +     "strings"          
+  5   )                       6   )                      
+  6                           7                          
+  7   func main() {           8   func main() {          
+  …   @@ -9,5 +10,6 @@        …                          
+  9   }                      10   }                      
+ 10                          11                          
+ 11   func getContent() str… 12   func getContent() str… 
+ 12 -     return "Hello, wo… 13 +     content := string… 
+                             14 +     return content     
+ 13   }                      15   }                      

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf058.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@          …                          
+  2                            2                          
+  3   import (                 3   import (               
+  4       "fmt"                4       "fmt"              
+                               5 +     "strings"          
+  5   )                        6   )                      
+  6                            7                          
+  7   func main() {            8   func main() {          
+  …   @@ -9,5 +10,6 @@         …                          
+  9   }                       10   }                      
+ 10                           11                          
+ 11   func getContent() stri… 12   func getContent() stri…
+ 12 -     return "Hello, wor… 13 +     content := strings…
+                              14 +     return content     
+ 13   }                       15   }                      

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf059.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@          …                           
+  2                            2                           
+  3   import (                 3   import (                
+  4       "fmt"                4       "fmt"               
+                               5 +     "strings"           
+  5   )                        6   )                       
+  6                            7                           
+  7   func main() {            8   func main() {           
+  …   @@ -9,5 +10,6 @@         …                           
+  9   }                       10   }                       
+ 10                           11                           
+ 11   func getContent() stri… 12   func getContent() stri… 
+ 12 -     return "Hello, wor… 13 +     content := strings… 
+                              14 +     return content      
+ 13   }                       15   }                       

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf060.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@           …                           
+  2                             2                           
+  3   import (                  3   import (                
+  4       "fmt"                 4       "fmt"               
+                                5 +     "strings"           
+  5   )                         6   )                       
+  6                             7                           
+  7   func main() {             8   func main() {           
+  …   @@ -9,5 +10,6 @@          …                           
+  9   }                        10   }                       
+ 10                            11                           
+ 11   func getContent() strin… 12   func getContent() strin…
+ 12 -     return "Hello, worl… 13 +     content := strings.…
+                               14 +     return content      
+ 13   }                        15   }                       

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf061.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@           …                            
+  2                             2                            
+  3   import (                  3   import (                 
+  4       "fmt"                 4       "fmt"                
+                                5 +     "strings"            
+  5   )                         6   )                        
+  6                             7                            
+  7   func main() {             8   func main() {            
+  …   @@ -9,5 +10,6 @@          …                            
+  9   }                        10   }                        
+ 10                            11                            
+ 11   func getContent() strin… 12   func getContent() strin… 
+ 12 -     return "Hello, worl… 13 +     content := strings.… 
+                               14 +     return content       
+ 13   }                        15   }                        

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf062.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@            …                            
+  2                              2                            
+  3   import (                   3   import (                 
+  4       "fmt"                  4       "fmt"                
+                                 5 +     "strings"            
+  5   )                          6   )                        
+  6                              7                            
+  7   func main() {              8   func main() {            
+  …   @@ -9,5 +10,6 @@           …                            
+  9   }                         10   }                        
+ 10                             11                            
+ 11   func getContent() string… 12   func getContent() string…
+ 12 -     return "Hello, world… 13 +     content := strings.T…
+                                14 +     return content       
+ 13   }                         15   }                        

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf063.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@            …                             
+  2                              2                             
+  3   import (                   3   import (                  
+  4       "fmt"                  4       "fmt"                 
+                                 5 +     "strings"             
+  5   )                          6   )                         
+  6                              7                             
+  7   func main() {              8   func main() {             
+  …   @@ -9,5 +10,6 @@           …                             
+  9   }                         10   }                         
+ 10                             11                             
+ 11   func getContent() string… 12   func getContent() string… 
+ 12 -     return "Hello, world… 13 +     content := strings.T… 
+                                14 +     return content        
+ 13   }                         15   }                         

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf064.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@             …                             
+  2                               2                             
+  3   import (                    3   import (                  
+  4       "fmt"                   4       "fmt"                 
+                                  5 +     "strings"             
+  5   )                           6   )                         
+  6                               7                             
+  7   func main() {               8   func main() {             
+  …   @@ -9,5 +10,6 @@            …                             
+  9   }                          10   }                         
+ 10                              11                             
+ 11   func getContent() string { 12   func getContent() string {
+ 12 -     return "Hello, world!" 13 +     content := strings.To…
+                                 14 +     return content        
+ 13   }                          15   }                         

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf065.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@             …                              
+  2                               2                              
+  3   import (                    3   import (                   
+  4       "fmt"                   4       "fmt"                  
+                                  5 +     "strings"              
+  5   )                           6   )                          
+  6                               7                              
+  7   func main() {               8   func main() {              
+  …   @@ -9,5 +10,6 @@            …                              
+  9   }                          10   }                          
+ 10                              11                              
+ 11   func getContent() string { 12   func getContent() string { 
+ 12 -     return "Hello, world!" 13 +     content := strings.To… 
+                                 14 +     return content         
+ 13   }                          15   }                          

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf066.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@              …                              
+  2                                2                              
+  3   import (                     3   import (                   
+  4       "fmt"                    4       "fmt"                  
+                                   5 +     "strings"              
+  5   )                            6   )                          
+  6                                7                              
+  7   func main() {                8   func main() {              
+  …   @@ -9,5 +10,6 @@             …                              
+  9   }                           10   }                          
+ 10                               11                              
+ 11   func getContent() string {  12   func getContent() string { 
+ 12 -     return "Hello, world!"  13 +     content := strings.ToU…
+                                  14 +     return content         
+ 13   }                           15   }                          

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf067.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@              …                               
+  2                                2                               
+  3   import (                     3   import (                    
+  4       "fmt"                    4       "fmt"                   
+                                   5 +     "strings"               
+  5   )                            6   )                           
+  6                                7                               
+  7   func main() {                8   func main() {               
+  …   @@ -9,5 +10,6 @@             …                               
+  9   }                           10   }                           
+ 10                               11                               
+ 11   func getContent() string {  12   func getContent() string {  
+ 12 -     return "Hello, world!"  13 +     content := strings.ToU… 
+                                  14 +     return content          
+ 13   }                           15   }                           

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf068.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@               …                               
+  2                                 2                               
+  3   import (                      3   import (                    
+  4       "fmt"                     4       "fmt"                   
+                                    5 +     "strings"               
+  5   )                             6   )                           
+  6                                 7                               
+  7   func main() {                 8   func main() {               
+  …   @@ -9,5 +10,6 @@              …                               
+  9   }                            10   }                           
+ 10                                11                               
+ 11   func getContent() string {   12   func getContent() string {  
+ 12 -     return "Hello, world!"   13 +     content := strings.ToUp…
+                                   14 +     return content          
+ 13   }                            15   }                           

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf069.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@               …                                
+  2                                 2                                
+  3   import (                      3   import (                     
+  4       "fmt"                     4       "fmt"                    
+                                    5 +     "strings"                
+  5   )                             6   )                            
+  6                                 7                                
+  7   func main() {                 8   func main() {                
+  …   @@ -9,5 +10,6 @@              …                                
+  9   }                            10   }                            
+ 10                                11                                
+ 11   func getContent() string {   12   func getContent() string {   
+ 12 -     return "Hello, world!"   13 +     content := strings.ToUp… 
+                                   14 +     return content           
+ 13   }                            15   }                            

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf070.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                …                                
+  2                                  2                                
+  3   import (                       3   import (                     
+  4       "fmt"                      4       "fmt"                    
+                                     5 +     "strings"                
+  5   )                              6   )                            
+  6                                  7                                
+  7   func main() {                  8   func main() {                
+  …   @@ -9,5 +10,6 @@               …                                
+  9   }                             10   }                            
+ 10                                 11                                
+ 11   func getContent() string {    12   func getContent() string {   
+ 12 -     return "Hello, world!"    13 +     content := strings.ToUpp…
+                                    14 +     return content           
+ 13   }                             15   }                            

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf071.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                …                                 
+  2                                  2                                 
+  3   import (                       3   import (                      
+  4       "fmt"                      4       "fmt"                     
+                                     5 +     "strings"                 
+  5   )                              6   )                             
+  6                                  7                                 
+  7   func main() {                  8   func main() {                 
+  …   @@ -9,5 +10,6 @@               …                                 
+  9   }                             10   }                             
+ 10                                 11                                 
+ 11   func getContent() string {    12   func getContent() string {    
+ 12 -     return "Hello, world!"    13 +     content := strings.ToUpp… 
+                                    14 +     return content            
+ 13   }                             15   }                             

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf072.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                 …                                 
+  2                                   2                                 
+  3   import (                        3   import (                      
+  4       "fmt"                       4       "fmt"                     
+                                      5 +     "strings"                 
+  5   )                               6   )                             
+  6                                   7                                 
+  7   func main() {                   8   func main() {                 
+  …   @@ -9,5 +10,6 @@                …                                 
+  9   }                              10   }                             
+ 10                                  11                                 
+ 11   func getContent() string {     12   func getContent() string {    
+ 12 -     return "Hello, world!"     13 +     content := strings.ToUppe…
+                                     14 +     return content            
+ 13   }                              15   }                             

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf073.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                 …                                  
+  2                                   2                                  
+  3   import (                        3   import (                       
+  4       "fmt"                       4       "fmt"                      
+                                      5 +     "strings"                  
+  5   )                               6   )                              
+  6                                   7                                  
+  7   func main() {                   8   func main() {                  
+  …   @@ -9,5 +10,6 @@                …                                  
+  9   }                              10   }                              
+ 10                                  11                                  
+ 11   func getContent() string {     12   func getContent() string {     
+ 12 -     return "Hello, world!"     13 +     content := strings.ToUppe… 
+                                     14 +     return content             
+ 13   }                              15   }                              

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf074.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                  …                                  
+  2                                    2                                  
+  3   import (                         3   import (                       
+  4       "fmt"                        4       "fmt"                      
+                                       5 +     "strings"                  
+  5   )                                6   )                              
+  6                                    7                                  
+  7   func main() {                    8   func main() {                  
+  …   @@ -9,5 +10,6 @@                 …                                  
+  9   }                               10   }                              
+ 10                                   11                                  
+ 11   func getContent() string {      12   func getContent() string {     
+ 12 -     return "Hello, world!"      13 +     content := strings.ToUpper…
+                                      14 +     return content             
+ 13   }                               15   }                              

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf075.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                  …                                   
+  2                                    2                                   
+  3   import (                         3   import (                        
+  4       "fmt"                        4       "fmt"                       
+                                       5 +     "strings"                   
+  5   )                                6   )                               
+  6                                    7                                   
+  7   func main() {                    8   func main() {                   
+  …   @@ -9,5 +10,6 @@                 …                                   
+  9   }                               10   }                               
+ 10                                   11                                   
+ 11   func getContent() string {      12   func getContent() string {      
+ 12 -     return "Hello, world!"      13 +     content := strings.ToUpper… 
+                                      14 +     return content              
+ 13   }                               15   }                               

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf076.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                   …                                   
+  2                                     2                                   
+  3   import (                          3   import (                        
+  4       "fmt"                         4       "fmt"                       
+                                        5 +     "strings"                   
+  5   )                                 6   )                               
+  6                                     7                                   
+  7   func main() {                     8   func main() {                   
+  …   @@ -9,5 +10,6 @@                  …                                   
+  9   }                                10   }                               
+ 10                                    11                                   
+ 11   func getContent() string {       12   func getContent() string {      
+ 12 -     return "Hello, world!"       13 +     content := strings.ToUpper(…
+                                       14 +     return content              
+ 13   }                                15   }                               

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf077.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                   …                                    
+  2                                     2                                    
+  3   import (                          3   import (                         
+  4       "fmt"                         4       "fmt"                        
+                                        5 +     "strings"                    
+  5   )                                 6   )                                
+  6                                     7                                    
+  7   func main() {                     8   func main() {                    
+  …   @@ -9,5 +10,6 @@                  …                                    
+  9   }                                10   }                                
+ 10                                    11                                    
+ 11   func getContent() string {       12   func getContent() string {       
+ 12 -     return "Hello, world!"       13 +     content := strings.ToUpper(… 
+                                       14 +     return content               
+ 13   }                                15   }                                

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf078.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                    …                                    
+  2                                      2                                    
+  3   import (                           3   import (                         
+  4       "fmt"                          4       "fmt"                        
+                                         5 +     "strings"                    
+  5   )                                  6   )                                
+  6                                      7                                    
+  7   func main() {                      8   func main() {                    
+  …   @@ -9,5 +10,6 @@                   …                                    
+  9   }                                 10   }                                
+ 10                                     11                                    
+ 11   func getContent() string {        12   func getContent() string {       
+ 12 -     return "Hello, world!"        13 +     content := strings.ToUpper("…
+                                        14 +     return content               
+ 13   }                                 15   }                                

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf079.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                    …                                     
+  2                                      2                                     
+  3   import (                           3   import (                          
+  4       "fmt"                          4       "fmt"                         
+                                         5 +     "strings"                     
+  5   )                                  6   )                                 
+  6                                      7                                     
+  7   func main() {                      8   func main() {                     
+  …   @@ -9,5 +10,6 @@                   …                                     
+  9   }                                 10   }                                 
+ 10                                     11                                     
+ 11   func getContent() string {        12   func getContent() string {        

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf080.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                     …                                     
+  2                                       2                                     
+  3   import (                            3   import (                          
+  4       "fmt"                           4       "fmt"                         
+                                          5 +     "strings"                     
+  5   )                                   6   )                                 
+  6                                       7                                     
+  7   func main() {                       8   func main() {                     
+  …   @@ -9,5 +10,6 @@                    …                                     
+  9   }                                  10   }                                 
+ 10                                      11                                     
+ 11   func getContent() string {         12   func getContent() string {        
+ 12 -     return "Hello, world!"         13 +     content := strings.ToUpper("H…
+                                         14 +     return content                
+ 13   }                                  15   }                                 

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf081.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                     …                                      
+  2                                       2                                      
+  3   import (                            3   import (                           
+  4       "fmt"                           4       "fmt"                          
+                                          5 +     "strings"                      
+  5   )                                   6   )                                  
+  6                                       7                                      
+  7   func main() {                       8   func main() {                      
+  …   @@ -9,5 +10,6 @@                    …                                      
+  9   }                                  10   }                                  
+ 10                                      11                                      
+ 11   func getContent() string {         12   func getContent() string {         

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf082.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                      …                                      
+  2                                        2                                      
+  3   import (                             3   import (                           
+  4       "fmt"                            4       "fmt"                          
+                                           5 +     "strings"                      
+  5   )                                    6   )                                  
+  6                                        7                                      
+  7   func main() {                        8   func main() {                      
+  …   @@ -9,5 +10,6 @@                     …                                      
+  9   }                                   10   }                                  
+ 10                                       11                                      
+ 11   func getContent() string {          12   func getContent() string {         
+ 12 -     return "Hello, world!"          13 +     content := strings.ToUpper("He…
+                                          14 +     return content                 
+ 13   }                                   15   }                                  

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf083.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                      …                                       
+  2                                        2                                       
+  3   import (                             3   import (                            
+  4       "fmt"                            4       "fmt"                           
+                                           5 +     "strings"                       
+  5   )                                    6   )                                   
+  6                                        7                                       
+  7   func main() {                        8   func main() {                       
+  …   @@ -9,5 +10,6 @@                     …                                       
+  9   }                                   10   }                                   
+ 10                                       11                                       
+ 11   func getContent() string {          12   func getContent() string {          

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf084.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                       …                                       
+  2                                         2                                       
+  3   import (                              3   import (                            
+  4       "fmt"                             4       "fmt"                           
+                                            5 +     "strings"                       
+  5   )                                     6   )                                   
+  6                                         7                                       
+  7   func main() {                         8   func main() {                       
+  …   @@ -9,5 +10,6 @@                      …                                       
+  9   }                                    10   }                                   
+ 10                                        11                                       
+ 11   func getContent() string {           12   func getContent() string {          
+ 12 -     return "Hello, world!"           13 +     content := strings.ToUpper("Hel…
+                                           14 +     return content                  
+ 13   }                                    15   }                                   

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf085.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                       …                                        
+  2                                         2                                        
+  3   import (                              3   import (                             
+  4       "fmt"                             4       "fmt"                            
+                                            5 +     "strings"                        
+  5   )                                     6   )                                    
+  6                                         7                                        
+  7   func main() {                         8   func main() {                        
+  …   @@ -9,5 +10,6 @@                      …                                        
+  9   }                                    10   }                                    
+ 10                                        11                                        
+ 11   func getContent() string {           12   func getContent() string {           

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf086.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                        …                                        
+  2                                          2                                        
+  3   import (                               3   import (                             
+  4       "fmt"                              4       "fmt"                            
+                                             5 +     "strings"                        
+  5   )                                      6   )                                    
+  6                                          7                                        
+  7   func main() {                          8   func main() {                        
+  …   @@ -9,5 +10,6 @@                       …                                        
+  9   }                                     10   }                                    
+ 10                                         11                                        
+ 11   func getContent() string {            12   func getContent() string {           
+ 12 -     return "Hello, world!"            13 +     content := strings.ToUpper("Hell…
+                                            14 +     return content                   
+ 13   }                                     15   }                                    

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf087.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                        …                                         
+  2                                          2                                         
+  3   import (                               3   import (                              
+  4       "fmt"                              4       "fmt"                             
+                                             5 +     "strings"                         
+  5   )                                      6   )                                     
+  6                                          7                                         
+  7   func main() {                          8   func main() {                         
+  …   @@ -9,5 +10,6 @@                       …                                         
+  9   }                                     10   }                                     
+ 10                                         11                                         
+ 11   func getContent() string {            12   func getContent() string {            

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf088.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                         …                                         
+  2                                           2                                         
+  3   import (                                3   import (                              
+  4       "fmt"                               4       "fmt"                             
+                                              5 +     "strings"                         
+  5   )                                       6   )                                     
+  6                                           7                                         
+  7   func main() {                           8   func main() {                         
+  …   @@ -9,5 +10,6 @@                        …                                         
+  9   }                                      10   }                                     
+ 10                                          11                                         
+ 11   func getContent() string {             12   func getContent() string {            
+ 12 -     return "Hello, world!"             13 +     content := strings.ToUpper("Hello…
+                                             14 +     return content                    
+ 13   }                                      15   }                                     

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf089.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                         …                                          
+  2                                           2                                          
+  3   import (                                3   import (                               
+  4       "fmt"                               4       "fmt"                              
+                                              5 +     "strings"                          
+  5   )                                       6   )                                      
+  6                                           7                                          
+  7   func main() {                           8   func main() {                          
+  …   @@ -9,5 +10,6 @@                        …                                          
+  9   }                                      10   }                                      
+ 10                                          11                                          
+ 11   func getContent() string {             12   func getContent() string {             

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf090.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                          …                                          
+  2                                            2                                          
+  3   import (                                 3   import (                               
+  4       "fmt"                                4       "fmt"                              
+                                               5 +     "strings"                          
+  5   )                                        6   )                                      
+  6                                            7                                          
+  7   func main() {                            8   func main() {                          
+  …   @@ -9,5 +10,6 @@                         …                                          
+  9   }                                       10   }                                      
+ 10                                           11                                          
+ 11   func getContent() string {              12   func getContent() string {             
+ 12 -     return "Hello, world!"              13 +     content := strings.ToUpper("Hello,…
+                                              14 +     return content                     
+ 13   }                                       15   }                                      

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf091.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                          …                                           
+  2                                            2                                           
+  3   import (                                 3   import (                                
+  4       "fmt"                                4       "fmt"                               
+                                               5 +     "strings"                           
+  5   )                                        6   )                                       
+  6                                            7                                           
+  7   func main() {                            8   func main() {                           
+  …   @@ -9,5 +10,6 @@                         …                                           
+  9   }                                       10   }                                       
+ 10                                           11                                           
+ 11   func getContent() string {              12   func getContent() string {              

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf092.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                           …                                           
+  2                                             2                                           
+  3   import (                                  3   import (                                
+  4       "fmt"                                 4       "fmt"                               
+                                                5 +     "strings"                           
+  5   )                                         6   )                                       
+  6                                             7                                           
+  7   func main() {                             8   func main() {                           
+  …   @@ -9,5 +10,6 @@                          …                                           
+  9   }                                        10   }                                       
+ 10                                            11                                           
+ 11   func getContent() string {               12   func getContent() string {              
+ 12 -     return "Hello, world!"               13 +     content := strings.ToUpper("Hello, …
+                                               14 +     return content                      
+ 13   }                                        15   }                                       

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf093.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                           …                                            
+  2                                             2                                            
+  3   import (                                  3   import (                                 
+  4       "fmt"                                 4       "fmt"                                
+                                                5 +     "strings"                            
+  5   )                                         6   )                                        
+  6                                             7                                            
+  7   func main() {                             8   func main() {                            
+  …   @@ -9,5 +10,6 @@                          …                                            
+  9   }                                        10   }                                        
+ 10                                            11                                            
+ 11   func getContent() string {               12   func getContent() string {               

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf094.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                            …                                            
+  2                                              2                                            
+  3   import (                                   3   import (                                 
+  4       "fmt"                                  4       "fmt"                                
+                                                 5 +     "strings"                            
+  5   )                                          6   )                                        
+  6                                              7                                            
+  7   func main() {                              8   func main() {                            
+  …   @@ -9,5 +10,6 @@                           …                                            
+  9   }                                         10   }                                        
+ 10                                             11                                            
+ 11   func getContent() string {                12   func getContent() string {               
+ 12 -     return "Hello, world!"                13 +     content := strings.ToUpper("Hello, W…
+                                                14 +     return content                       
+ 13   }                                         15   }                                        

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf095.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                            …                                             
+  2                                              2                                             
+  3   import (                                   3   import (                                  
+  4       "fmt"                                  4       "fmt"                                 
+                                                 5 +     "strings"                             
+  5   )                                          6   )                                         
+  6                                              7                                             
+  7   func main() {                              8   func main() {                             
+  …   @@ -9,5 +10,6 @@                           …                                             
+  9   }                                         10   }                                         
+ 10                                             11                                             
+ 11   func getContent() string {                12   func getContent() string {                

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf096.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                             …                                             
+  2                                               2                                             
+  3   import (                                    3   import (                                  
+  4       "fmt"                                   4       "fmt"                                 
+                                                  5 +     "strings"                             
+  5   )                                           6   )                                         
+  6                                               7                                             
+  7   func main() {                               8   func main() {                             
+  …   @@ -9,5 +10,6 @@                            …                                             
+  9   }                                          10   }                                         
+ 10                                              11                                             
+ 11   func getContent() string {                 12   func getContent() string {                
+ 12 -     return "Hello, world!"                 13 +     content := strings.ToUpper("Hello, Wo…
+                                                 14 +     return content                        
+ 13   }                                          15   }                                         

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf097.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                             …                                              
+  2                                               2                                              
+  3   import (                                    3   import (                                   
+  4       "fmt"                                   4       "fmt"                                  
+                                                  5 +     "strings"                              
+  5   )                                           6   )                                          
+  6                                               7                                              
+  7   func main() {                               8   func main() {                              
+  …   @@ -9,5 +10,6 @@                            …                                              
+  9   }                                          10   }                                          
+ 10                                              11                                              
+ 11   func getContent() string {                 12   func getContent() string {                 

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf098.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                              …                                              
+  2                                                2                                              
+  3   import (                                     3   import (                                   
+  4       "fmt"                                    4       "fmt"                                  
+                                                   5 +     "strings"                              
+  5   )                                            6   )                                          
+  6                                                7                                              
+  7   func main() {                                8   func main() {                              
+  …   @@ -9,5 +10,6 @@                             …                                              
+  9   }                                           10   }                                          
+ 10                                               11                                              
+ 11   func getContent() string {                  12   func getContent() string {                 
+ 12 -     return "Hello, world!"                  13 +     content := strings.ToUpper("Hello, Wor…
+                                                  14 +     return content                         
+ 13   }                                           15   }                                          

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf099.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                              …                                               
+  2                                                2                                               
+  3   import (                                     3   import (                                    
+  4       "fmt"                                    4       "fmt"                                   
+                                                   5 +     "strings"                               
+  5   )                                            6   )                                           
+  6                                                7                                               
+  7   func main() {                                8   func main() {                               
+  …   @@ -9,5 +10,6 @@                             …                                               
+  9   }                                           10   }                                           
+ 10                                               11                                               
+ 11   func getContent() string {                  12   func getContent() string {                  

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf100.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                               …                                               
+  2                                                 2                                               
+  3   import (                                      3   import (                                    
+  4       "fmt"                                     4       "fmt"                                   
+                                                    5 +     "strings"                               
+  5   )                                             6   )                                           
+  6                                                 7                                               
+  7   func main() {                                 8   func main() {                               
+  …   @@ -9,5 +10,6 @@                              …                                               
+  9   }                                            10   }                                           
+ 10                                                11                                               
+ 11   func getContent() string {                   12   func getContent() string {                  
+ 12 -     return "Hello, world!"                   13 +     content := strings.ToUpper("Hello, Worl…
+                                                   14 +     return content                          
+ 13   }                                            15   }                                           

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf101.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                               …                                                
+  2                                                 2                                                
+  3   import (                                      3   import (                                     
+  4       "fmt"                                     4       "fmt"                                    
+                                                    5 +     "strings"                                
+  5   )                                             6   )                                            
+  6                                                 7                                                
+  7   func main() {                                 8   func main() {                                
+  …   @@ -9,5 +10,6 @@                              …                                                
+  9   }                                            10   }                                            
+ 10                                                11                                                
+ 11   func getContent() string {                   12   func getContent() string {                   

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf102.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                …                                                
+  2                                                  2                                                
+  3   import (                                       3   import (                                     
+  4       "fmt"                                      4       "fmt"                                    
+                                                     5 +     "strings"                                
+  5   )                                              6   )                                            
+  6                                                  7                                                
+  7   func main() {                                  8   func main() {                                
+  …   @@ -9,5 +10,6 @@                               …                                                
+  9   }                                             10   }                                            
+ 10                                                 11                                                
+ 11   func getContent() string {                    12   func getContent() string {                   

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf103.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                …                                                 
+  2                                                  2                                                 
+  3   import (                                       3   import (                                      
+  4       "fmt"                                      4       "fmt"                                     
+                                                     5 +     "strings"                                 
+  5   )                                              6   )                                             
+  6                                                  7                                                 
+  7   func main() {                                  8   func main() {                                 
+  …   @@ -9,5 +10,6 @@                               …                                                 
+  9   }                                             10   }                                             
+ 10                                                 11                                                 
+ 11   func getContent() string {                    12   func getContent() string {                    

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf104.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                 …                                                 
+  2                                                   2                                                 
+  3   import (                                        3   import (                                      
+  4       "fmt"                                       4       "fmt"                                     
+                                                      5 +     "strings"                                 
+  5   )                                               6   )                                             
+  6                                                   7                                                 
+  7   func main() {                                   8   func main() {                                 
+  …   @@ -9,5 +10,6 @@                                …                                                 
+  9   }                                              10   }                                             
+ 10                                                  11                                                 
+ 11   func getContent() string {                     12   func getContent() string {                    

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf105.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                 …                                                  
+  2                                                   2                                                  
+  3   import (                                        3   import (                                       
+  4       "fmt"                                       4       "fmt"                                      
+                                                      5 +     "strings"                                  
+  5   )                                               6   )                                              
+  6                                                   7                                                  
+  7   func main() {                                   8   func main() {                                  
+  …   @@ -9,5 +10,6 @@                                …                                                  
+  9   }                                              10   }                                              
+ 10                                                  11                                                  
+ 11   func getContent() string {                     12   func getContent() string {                     

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf106.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                  …                                                  
+  2                                                    2                                                  
+  3   import (                                         3   import (                                       
+  4       "fmt"                                        4       "fmt"                                      
+                                                       5 +     "strings"                                  
+  5   )                                                6   )                                              
+  6                                                    7                                                  
+  7   func main() {                                    8   func main() {                                  
+  …   @@ -9,5 +10,6 @@                                 …                                                  
+  9   }                                               10   }                                              
+ 10                                                   11                                                  
+ 11   func getContent() string {                      12   func getContent() string {                     

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf107.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                  …                                                   
+  2                                                    2                                                   
+  3   import (                                         3   import (                                        
+  4       "fmt"                                        4       "fmt"                                       
+                                                       5 +     "strings"                                   
+  5   )                                                6   )                                               
+  6                                                    7                                                   
+  7   func main() {                                    8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                 …                                                   
+  9   }                                               10   }                                               
+ 10                                                   11                                                   
+ 11   func getContent() string {                      12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf108.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf109.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                    
+  2                                                     2                                                    
+  3   import (                                          3   import (                                         
+  4       "fmt"                                         4       "fmt"                                        
+                                                        5 +     "strings"                                    
+  5   )                                                 6   )                                                
+  6                                                     7                                                    
+  7   func main() {                                     8   func main() {                                    
+  …   @@ -9,5 +10,6 @@                                  …                                                    
+  9   }                                                10   }                                                
+ 10                                                    11                                                    
+ 11   func getContent() string {                       12   func getContent() string {                       

internal/exp/diffview/testdata/TestDiffViewWidth/Split/WidthOf110.golden 🔗

@@ -0,0 +1,15 @@
+  …   @@ -2,6 +2,7 @@                                    …                                                    
+  2                                                      2                                                    
+  3   import (                                           3   import (                                         
+  4       "fmt"                                          4       "fmt"                                        
+                                                         5 +     "strings"                                    
+  5   )                                                  6   )                                                
+  6                                                      7                                                    
+  7   func main() {                                      8   func main() {                                    
+  …   @@ -9,5 +10,6 @@                                   …                                                    
+  9   }                                                 10   }                                                
+ 10                                                     11                                                    
+ 11   func getContent() string {                        12   func getContent() string {                       

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf001.golden 🔗

@@ -0,0 +1,16 @@
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 
+ 

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf002.golden 🔗

@@ -0,0 +1,16 @@
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+ 1
+ 1
+ 1
+  
+  
+ 1

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf003.golden 🔗

@@ -0,0 +1,16 @@
+  …
+  2
+  3
+  4
+   
+  5
+  6
+  7
+  …
+  9
+ 10
+ 11
+ 12
+   
+   
+ 13

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf004.golden 🔗

@@ -0,0 +1,16 @@
+  … 
+  2 
+  3 
+  4 
+    
+  5 
+  6 
+  7 
+  … 
+  9 
+ 10 
+ 11 
+ 12 
+    
+    
+ 13 

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf005.golden 🔗

@@ -0,0 +1,16 @@
+  …  
+  2  
+  3  
+  4  
+     
+  5  
+  6  
+  7  
+  …  
+  9  
+ 10  
+ 11  
+ 12  
+     
+     
+ 13  

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf006.golden 🔗

@@ -0,0 +1,16 @@
+  …   
+  2   
+  3   
+  4   
+      
+  5   
+  6   
+  7   
+  …   
+  9  1
+ 10  1
+ 11  1
+ 12   
+     1
+     1
+ 13  1

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf007.golden 🔗

@@ -0,0 +1,16 @@
+  …   …
+  2   2
+  3   3
+  4   4
+      5
+  5   6
+  6   7
+  7   8
+  …   …
+  9  10
+ 10  11
+ 11  12
+ 12    
+     13
+     14
+ 13  15

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf008.golden 🔗

@@ -0,0 +1,16 @@
+  …   … 
+  2   2 
+  3   3 
+  4   4 
+      5 
+  5   6 
+  6   7 
+  7   8 
+  …   … 
+  9  10 
+ 10  11 
+ 11  12 
+ 12     
+     13 
+     14 
+ 13  15 

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf009.golden 🔗

@@ -0,0 +1,16 @@
+  …   … …
+  2   2  
+  3   3  
+  4   4  
+      5 +
+  5   6  
+  6   7  
+  7   8  
+  …   … …
+  9  10  
+ 10  11  
+ 11  12  
+ 12     -
+     13 +
+     14 +
+ 13  15  

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf010.golden 🔗

@@ -0,0 +1,16 @@
+  …   …  …
+  2   2   
+  3   3   
+  4   4   
+      5 + 
+  5   6   
+  6   7   
+  7   8   
+  …   …  …
+  9  10   
+ 10  11   
+ 11  12   
+ 12     - 
+     13 + 
+     14 + 
+ 13  15   

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf011.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   …
+  2   2    
+  3   3   …
+  4   4   …
+      5 + …
+  5   6   )
+  6   7    
+  7   8   …
+  …   …   …
+  9  10   }
+ 10  11    
+ 11  12   …
+ 12     - …
+     13 + …
+     14 + …
+ 13  15   }

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf012.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @…
+  2   2     
+  3   3   i…
+  4   4    …
+      5 +  …
+  5   6   ) 
+  6   7     
+  7   8   f…
+  …   …   @…
+  9  10   } 
+ 10  11     
+ 11  12   f…
+ 12     -  …
+     13 +  …
+     14 +  …
+ 13  15   } 

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf013.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@…
+  2   2      
+  3   3   im…
+  4   4     …
+      5 +   …
+  5   6   )  
+  6   7      
+  7   8   fu…
+  …   …   @@…
+  9  10   }  
+ 10  11      
+ 11  12   fu…
+ 12     -   …
+     13 +   …
+     14 +   …
+ 13  15   }  

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf014.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ …
+  2   2       
+  3   3   imp…
+  4   4      …
+      5 +    …
+  5   6   )   
+  6   7       
+  7   8   fun…
+  …   …   @@ …
+  9  10   }   
+ 10  11       
+ 11  12   fun…
+ 12     -    …
+     13 +    …
+     14 +    …
+ 13  15   }   

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf015.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -…
+  2   2        
+  3   3   impo…
+  4   4       …
+      5 +     …
+  5   6   )    
+  6   7        
+  7   8   func…
+  …   …   @@ -…
+  9  10   }    
+ 10  11        
+ 11  12   func…
+ 12     -     …
+     13 +     …
+     14 +     …
+ 13  15   }    

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf016.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2…
+  2   2         
+  3   3   impor…
+  4   4       "…
+      5 +     "…
+  5   6   )     
+  6   7         
+  7   8   func …
+  …   …   @@ -9…
+  9  10   }     
+ 10  11         
+ 11  12   func …
+ 12     -     r…
+     13 +     c…
+     14 +     r…
+ 13  15   }     

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf017.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,…
+  2   2          
+  3   3   import…
+  4   4       "f…
+      5 +     "s…
+  5   6   )      
+  6   7          
+  7   8   func m…
+  …   …   @@ -9,…
+  9  10   }      
+ 10  11          
+ 11  12   func g…
+ 12     -     re…
+     13 +     co…
+     14 +     re…
+ 13  15   }      

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf018.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6…
+  2   2           
+  3   3   import (
+  4   4       "fm…
+      5 +     "st…
+  5   6   )       
+  6   7           
+  7   8   func ma…
+  …   …   @@ -9,5…
+  9  10   }       
+ 10  11           
+ 11  12   func ge…
+ 12     -     ret…
+     13 +     con…
+     14 +     ret…
+ 13  15   }       

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf019.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 …
+  2   2            
+  3   3   import ( 
+  4   4       "fmt"
+      5 +     "str…
+  5   6   )        
+  6   7            
+  7   8   func mai…
+  …   …   @@ -9,5 …
+  9  10   }        
+ 10  11            
+ 11  12   func get…
+ 12     -     retu…
+     13 +     cont…
+     14 +     retu…
+ 13  15   }        

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf020.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +…
+  2   2             
+  3   3   import (  
+  4   4       "fmt" 
+      5 +     "stri…
+  5   6   )         
+  6   7             
+  7   8   func main…
+  …   …   @@ -9,5 +…
+  9  10   }         
+ 10  11             
+ 11  12   func getC…
+ 12     -     retur…
+     13 +     conte…
+     14 +     retur…
+ 13  15   }         

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf021.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2…
+  2   2              
+  3   3   import (   
+  4   4       "fmt"  
+      5 +     "strin…
+  5   6   )          
+  6   7              
+  7   8   func main(…
+  …   …   @@ -9,5 +1…
+  9  10   }          
+ 10  11              
+ 11  12   func getCo…
+ 12     -     return…
+     13 +     conten…
+     14 +     return…
+ 13  15   }          

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf022.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,…
+  2   2               
+  3   3   import (    
+  4   4       "fmt"   
+      5 +     "string…
+  5   6   )           
+  6   7               
+  7   8   func main()…
+  …   …   @@ -9,5 +10…
+  9  10   }           
+ 10  11               
+ 11  12   func getCon…
+ 12     -     return …
+     13 +     content…
+     14 +     return …
+ 13  15   }           

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf023.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7…
+  2   2                
+  3   3   import (     
+  4   4       "fmt"    
+      5 +     "strings"
+  5   6   )            
+  6   7                
+  7   8   func main() {
+  …   …   @@ -9,5 +10,…
+  9  10   }            
+ 10  11                
+ 11  12   func getCont…
+ 12     -     return "…
+     13 +     content …
+     14 +     return c…
+ 13  15   }            

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf024.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 …
+  2   2                 
+  3   3   import (      
+  4   4       "fmt"     
+      5 +     "strings" 
+  5   6   )             
+  6   7                 
+  7   8   func main() { 
+  …   …   @@ -9,5 +10,6…
+  9  10   }             
+ 10  11                 
+ 11  12   func getConte…
+ 12     -     return "H…
+     13 +     content :…
+     14 +     return co…
+ 13  15   }             

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf025.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @…
+  2   2                  
+  3   3   import (       
+  4   4       "fmt"      
+      5 +     "strings"  
+  5   6   )              
+  6   7                  
+  7   8   func main() {  
+  …   …   @@ -9,5 +10,6 …
+  9  10   }              
+ 10  11                  
+ 11  12   func getConten…
+ 12     -     return "He…
+     13 +     content :=…
+     14 +     return con…
+ 13  15   }              

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf026.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@ 
+  2   2                   
+  3   3   import (        
+  4   4       "fmt"       
+      5 +     "strings"   
+  5   6   )               
+  6   7                   
+  7   8   func main() {   
+  …   …   @@ -9,5 +10,6 @…
+  9  10   }               
+ 10  11                   
+ 11  12   func getContent…
+ 12     -     return "Hel…
+     13 +     content := …
+     14 +     return cont…
+ 13  15   }               

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf027.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@  
+  2   2                    
+  3   3   import (         
+  4   4       "fmt"        
+      5 +     "strings"    
+  5   6   )                
+  6   7                    
+  7   8   func main() {    
+  …   …   @@ -9,5 +10,6 @@ 
+  9  10   }                
+ 10  11                    
+ 11  12   func getContent(…
+ 12     -     return "Hell…
+     13 +     content := s…
+     14 +     return conte…
+ 13  15   }                

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf028.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@   
+  2   2                     
+  3   3   import (          
+  4   4       "fmt"         
+      5 +     "strings"     
+  5   6   )                 
+  6   7                     
+  7   8   func main() {     
+  …   …   @@ -9,5 +10,6 @@  
+  9  10   }                 
+ 10  11                     
+ 11  12   func getContent()…
+ 12     -     return "Hello…
+     13 +     content := st…
+     14 +     return content
+ 13  15   }                 

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf029.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@    
+  2   2                      
+  3   3   import (           
+  4   4       "fmt"          
+      5 +     "strings"      
+  5   6   )                  
+  6   7                      
+  7   8   func main() {      
+  …   …   @@ -9,5 +10,6 @@   
+  9  10   }                  
+ 10  11                      
+ 11  12   func getContent() …
+ 12     -     return "Hello,…
+     13 +     content := str…
+     14 +     return content 
+ 13  15   }                  

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf030.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@     
+  2   2                       
+  3   3   import (            
+  4   4       "fmt"           
+      5 +     "strings"       
+  5   6   )                   
+  6   7                       
+  7   8   func main() {       
+  …   …   @@ -9,5 +10,6 @@    
+  9  10   }                   
+ 10  11                       
+ 11  12   func getContent() s…
+ 12     -     return "Hello, …
+     13 +     content := stri…
+     14 +     return content  
+ 13  15   }                   

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf031.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@      
+  2   2                        
+  3   3   import (             
+  4   4       "fmt"            
+      5 +     "strings"        
+  5   6   )                    
+  6   7                        
+  7   8   func main() {        
+  …   …   @@ -9,5 +10,6 @@     
+  9  10   }                    
+ 10  11                        
+ 11  12   func getContent() st…
+ 12     -     return "Hello, w…
+     13 +     content := strin…
+     14 +     return content   
+ 13  15   }                    

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf032.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@       
+  2   2                         
+  3   3   import (              
+  4   4       "fmt"             
+      5 +     "strings"         
+  5   6   )                     
+  6   7                         
+  7   8   func main() {         
+  …   …   @@ -9,5 +10,6 @@      
+  9  10   }                     
+ 10  11                         
+ 11  12   func getContent() str…
+ 12     -     return "Hello, wo…
+     13 +     content := string…
+     14 +     return content    
+ 13  15   }                     

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf033.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@        
+  2   2                          
+  3   3   import (               
+  4   4       "fmt"              
+      5 +     "strings"          
+  5   6   )                      
+  6   7                          
+  7   8   func main() {          
+  …   …   @@ -9,5 +10,6 @@       
+  9  10   }                      
+ 10  11                          
+ 11  12   func getContent() stri…
+ 12     -     return "Hello, wor…
+     13 +     content := strings…
+     14 +     return content     
+ 13  15   }                      

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf034.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@         
+  2   2                           
+  3   3   import (                
+  4   4       "fmt"               
+      5 +     "strings"           
+  5   6   )                       
+  6   7                           
+  7   8   func main() {           
+  …   …   @@ -9,5 +10,6 @@        
+  9  10   }                       
+ 10  11                           
+ 11  12   func getContent() strin…
+ 12     -     return "Hello, worl…
+     13 +     content := strings.…
+     14 +     return content      
+ 13  15   }                       

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf035.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@          
+  2   2                            
+  3   3   import (                 
+  4   4       "fmt"                
+      5 +     "strings"            
+  5   6   )                        
+  6   7                            
+  7   8   func main() {            
+  …   …   @@ -9,5 +10,6 @@         
+  9  10   }                        
+ 10  11                            
+ 11  12   func getContent() string…
+ 12     -     return "Hello, world…
+     13 +     content := strings.T…
+     14 +     return content       
+ 13  15   }                        

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf036.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@           
+  2   2                             
+  3   3   import (                  
+  4   4       "fmt"                 
+      5 +     "strings"             
+  5   6   )                         
+  6   7                             
+  7   8   func main() {             
+  …   …   @@ -9,5 +10,6 @@          
+  9  10   }                         
+ 10  11                             
+ 11  12   func getContent() string {
+ 12     -     return "Hello, world!"
+     13 +     content := strings.To…
+     14 +     return content        
+ 13  15   }                         

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf037.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@            
+  2   2                              
+  3   3   import (                   
+  4   4       "fmt"                  
+      5 +     "strings"              
+  5   6   )                          
+  6   7                              
+  7   8   func main() {              
+  …   …   @@ -9,5 +10,6 @@           
+  9  10   }                          
+ 10  11                              
+ 11  12   func getContent() string { 
+ 12     -     return "Hello, world!" 
+     13 +     content := strings.ToU…
+     14 +     return content         
+ 13  15   }                          

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf038.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@             
+  2   2                               
+  3   3   import (                    
+  4   4       "fmt"                   
+      5 +     "strings"               
+  5   6   )                           
+  6   7                               
+  7   8   func main() {               
+  …   …   @@ -9,5 +10,6 @@            
+  9  10   }                           
+ 10  11                               
+ 11  12   func getContent() string {  
+ 12     -     return "Hello, world!"  
+     13 +     content := strings.ToUp…
+     14 +     return content          
+ 13  15   }                           

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf039.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@              
+  2   2                                
+  3   3   import (                     
+  4   4       "fmt"                    
+      5 +     "strings"                
+  5   6   )                            
+  6   7                                
+  7   8   func main() {                
+  …   …   @@ -9,5 +10,6 @@             
+  9  10   }                            
+ 10  11                                
+ 11  12   func getContent() string {   
+ 12     -     return "Hello, world!"   
+     13 +     content := strings.ToUpp…
+     14 +     return content           
+ 13  15   }                            

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf040.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@               
+  2   2                                 
+  3   3   import (                      
+  4   4       "fmt"                     
+      5 +     "strings"                 
+  5   6   )                             
+  6   7                                 
+  7   8   func main() {                 
+  …   …   @@ -9,5 +10,6 @@              
+  9  10   }                             
+ 10  11                                 
+ 11  12   func getContent() string {    
+ 12     -     return "Hello, world!"    
+     13 +     content := strings.ToUppe…
+     14 +     return content            
+ 13  15   }                             

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf041.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                
+  2   2                                  
+  3   3   import (                       
+  4   4       "fmt"                      
+      5 +     "strings"                  
+  5   6   )                              
+  6   7                                  
+  7   8   func main() {                  
+  …   …   @@ -9,5 +10,6 @@               
+  9  10   }                              
+ 10  11                                  
+ 11  12   func getContent() string {     
+ 12     -     return "Hello, world!"     
+     13 +     content := strings.ToUpper…
+     14 +     return content             
+ 13  15   }                              

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf042.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                 
+  2   2                                   
+  3   3   import (                        
+  4   4       "fmt"                       
+      5 +     "strings"                   
+  5   6   )                               
+  6   7                                   
+  7   8   func main() {                   
+  …   …   @@ -9,5 +10,6 @@                
+  9  10   }                               
+ 10  11                                   
+ 11  12   func getContent() string {      
+ 12     -     return "Hello, world!"      
+     13 +     content := strings.ToUpper(…
+     14 +     return content              
+ 13  15   }                               

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf043.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                  
+  2   2                                    
+  3   3   import (                         
+  4   4       "fmt"                        
+      5 +     "strings"                    
+  5   6   )                                
+  6   7                                    
+  7   8   func main() {                    
+  …   …   @@ -9,5 +10,6 @@                 
+  9  10   }                                
+ 10  11                                    
+ 11  12   func getContent() string {       
+ 12     -     return "Hello, world!"       
+     13 +     content := strings.ToUpper("…
+     14 +     return content               
+ 13  15   }                                

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf044.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                   
+  2   2                                     
+  3   3   import (                          
+  4   4       "fmt"                         
+      5 +     "strings"                     
+  5   6   )                                 
+  6   7                                     
+  7   8   func main() {                     
+  …   …   @@ -9,5 +10,6 @@                  
+  9  10   }                                 
+ 10  11                                     
+ 11  12   func getContent() string {        
+ 12     -     return "Hello, world!"        
+     13 +     content := strings.ToUpper("H…
+     14 +     return content                
+ 13  15   }                                 

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf045.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                    
+  2   2                                      
+  3   3   import (                           
+  4   4       "fmt"                          
+      5 +     "strings"                      
+  5   6   )                                  
+  6   7                                      
+  7   8   func main() {                      
+  …   …   @@ -9,5 +10,6 @@                   
+  9  10   }                                  
+ 10  11                                      
+ 11  12   func getContent() string {         
+ 12     -     return "Hello, world!"         
+     13 +     content := strings.ToUpper("He…
+     14 +     return content                 
+ 13  15   }                                  

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf046.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                     
+  2   2                                       
+  3   3   import (                            
+  4   4       "fmt"                           
+      5 +     "strings"                       
+  5   6   )                                   
+  6   7                                       
+  7   8   func main() {                       
+  …   …   @@ -9,5 +10,6 @@                    
+  9  10   }                                   
+ 10  11                                       
+ 11  12   func getContent() string {          
+ 12     -     return "Hello, world!"          
+     13 +     content := strings.ToUpper("Hel…
+     14 +     return content                  
+ 13  15   }                                   

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf047.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                      
+  2   2                                        
+  3   3   import (                             
+  4   4       "fmt"                            
+      5 +     "strings"                        
+  5   6   )                                    
+  6   7                                        
+  7   8   func main() {                        
+  …   …   @@ -9,5 +10,6 @@                     
+  9  10   }                                    
+ 10  11                                        
+ 11  12   func getContent() string {           
+ 12     -     return "Hello, world!"           
+     13 +     content := strings.ToUpper("Hell…
+     14 +     return content                   
+ 13  15   }                                    

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf048.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                       
+  2   2                                         
+  3   3   import (                              
+  4   4       "fmt"                             
+      5 +     "strings"                         
+  5   6   )                                     
+  6   7                                         
+  7   8   func main() {                         
+  …   …   @@ -9,5 +10,6 @@                      
+  9  10   }                                     
+ 10  11                                         
+ 11  12   func getContent() string {            
+ 12     -     return "Hello, world!"            
+     13 +     content := strings.ToUpper("Hello…
+     14 +     return content                    
+ 13  15   }                                     

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf049.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                        
+  2   2                                          
+  3   3   import (                               
+  4   4       "fmt"                              
+      5 +     "strings"                          
+  5   6   )                                      
+  6   7                                          
+  7   8   func main() {                          
+  …   …   @@ -9,5 +10,6 @@                       
+  9  10   }                                      
+ 10  11                                          
+ 11  12   func getContent() string {             
+ 12     -     return "Hello, world!"             
+     13 +     content := strings.ToUpper("Hello,…
+     14 +     return content                     
+ 13  15   }                                      

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf050.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                         
+  2   2                                           
+  3   3   import (                                
+  4   4       "fmt"                               
+      5 +     "strings"                           
+  5   6   )                                       
+  6   7                                           
+  7   8   func main() {                           
+  …   …   @@ -9,5 +10,6 @@                        
+  9  10   }                                       
+ 10  11                                           
+ 11  12   func getContent() string {              
+ 12     -     return "Hello, world!"              
+     13 +     content := strings.ToUpper("Hello, …
+     14 +     return content                      
+ 13  15   }                                       

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf051.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                          
+  2   2                                            
+  3   3   import (                                 
+  4   4       "fmt"                                
+      5 +     "strings"                            
+  5   6   )                                        
+  6   7                                            
+  7   8   func main() {                            
+  …   …   @@ -9,5 +10,6 @@                         
+  9  10   }                                        
+ 10  11                                            
+ 11  12   func getContent() string {               
+ 12     -     return "Hello, world!"               
+     13 +     content := strings.ToUpper("Hello, W…
+     14 +     return content                       
+ 13  15   }                                        

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf052.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                           
+  2   2                                             
+  3   3   import (                                  
+  4   4       "fmt"                                 
+      5 +     "strings"                             
+  5   6   )                                         
+  6   7                                             
+  7   8   func main() {                             
+  …   …   @@ -9,5 +10,6 @@                          
+  9  10   }                                         
+ 10  11                                             
+ 11  12   func getContent() string {                
+ 12     -     return "Hello, world!"                
+     13 +     content := strings.ToUpper("Hello, Wo…
+     14 +     return content                        
+ 13  15   }                                         

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf053.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                            
+  2   2                                              
+  3   3   import (                                   
+  4   4       "fmt"                                  
+      5 +     "strings"                              
+  5   6   )                                          
+  6   7                                              
+  7   8   func main() {                              
+  …   …   @@ -9,5 +10,6 @@                           
+  9  10   }                                          
+ 10  11                                              
+ 11  12   func getContent() string {                 
+ 12     -     return "Hello, world!"                 
+     13 +     content := strings.ToUpper("Hello, Wor…
+     14 +     return content                         
+ 13  15   }                                          

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf054.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                             
+  2   2                                               
+  3   3   import (                                    
+  4   4       "fmt"                                   
+      5 +     "strings"                               
+  5   6   )                                           
+  6   7                                               
+  7   8   func main() {                               
+  …   …   @@ -9,5 +10,6 @@                            
+  9  10   }                                           
+ 10  11                                               
+ 11  12   func getContent() string {                  
+ 12     -     return "Hello, world!"                  
+     13 +     content := strings.ToUpper("Hello, Worl…
+     14 +     return content                          
+ 13  15   }                                           

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf055.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                              
+  2   2                                                
+  3   3   import (                                     
+  4   4       "fmt"                                    
+      5 +     "strings"                                
+  5   6   )                                            
+  6   7                                                
+  7   8   func main() {                                
+  …   …   @@ -9,5 +10,6 @@                             
+  9  10   }                                            
+ 10  11                                                
+ 11  12   func getContent() string {                   
+ 12     -     return "Hello, world!"                   
+     13 +     content := strings.ToUpper("Hello, World…
+     14 +     return content                           
+ 13  15   }                                            

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf056.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                               
+  2   2                                                 
+  3   3   import (                                      
+  4   4       "fmt"                                     
+      5 +     "strings"                                 
+  5   6   )                                             
+  6   7                                                 
+  7   8   func main() {                                 
+  …   …   @@ -9,5 +10,6 @@                              
+  9  10   }                                             
+ 10  11                                                 
+ 11  12   func getContent() string {                    
+ 12     -     return "Hello, world!"                    
+     13 +     content := strings.ToUpper("Hello, World!…
+     14 +     return content                            
+ 13  15   }                                             

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf057.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                
+  2   2                                                  
+  3   3   import (                                       
+  4   4       "fmt"                                      
+      5 +     "strings"                                  
+  5   6   )                                              
+  6   7                                                  
+  7   8   func main() {                                  
+  …   …   @@ -9,5 +10,6 @@                               
+  9  10   }                                              
+ 10  11                                                  
+ 11  12   func getContent() string {                     
+ 12     -     return "Hello, world!"                     
+     13 +     content := strings.ToUpper("Hello, World!")
+     14 +     return content                             
+ 13  15   }                                              

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf058.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf059.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                  
+  2   2                                                    
+  3   3   import (                                         
+  4   4       "fmt"                                        
+      5 +     "strings"                                    
+  5   6   )                                                
+  6   7                                                    
+  7   8   func main() {                                    
+  …   …   @@ -9,5 +10,6 @@                                 
+  9  10   }                                                
+ 10  11                                                    
+ 11  12   func getContent() string {                       
+ 12     -     return "Hello, world!"                       
+     13 +     content := strings.ToUpper("Hello, World!")  
+     14 +     return content                               
+ 13  15   }                                                

internal/exp/diffview/testdata/TestDiffViewWidth/Unified/WidthOf060.golden 🔗

@@ -0,0 +1,16 @@
+  …   …   @@ -2,6 +2,7 @@                                   
+  2   2                                                     
+  3   3   import (                                          
+  4   4       "fmt"                                         
+      5 +     "strings"                                     
+  5   6   )                                                 
+  6   7                                                     
+  7   8   func main() {                                     
+  …   …   @@ -9,5 +10,6 @@                                  
+  9  10   }                                                 
+ 10  11                                                     
+ 11  12   func getContent() string {                        
+ 12     -     return "Hello, world!"                        
+     13 +     content := strings.ToUpper("Hello, World!")   
+     14 +     return content                                
+ 13  15   }                                                 

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf00.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5   )                         5   )                       
+  6                             6                           
+  7   func main() {             7   func main() {           
+  8 -     fmt.Println("Hello,…  8 +     content := "Hello, …
+                                9 +     fmt.Println(content)
+  9   }                        10   }                       

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf01.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …unc main() {              7  …unc main() {            
+  8 -…   fmt.Println("Hello, …  8 +…   content := "Hello, w…
+                                9 +…   fmt.Println(content) 
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf02.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …nc main() {               7  …nc main() {             
+  8 -…  fmt.Println("Hello, w…  8 +…  content := "Hello, wo…
+                                9 +…  fmt.Println(content)  
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf03.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …c main() {                7  …c main() {              
+  8 -… fmt.Println("Hello, wo…  8 +… content := "Hello, wor…
+                                9 +… fmt.Println(content)   
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf04.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  … main() {                 7  … main() {               
+  8 -…fmt.Println("Hello, wor…  8 +…content := "Hello, worl…
+                                9 +…fmt.Println(content)    
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf05.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …main() {                  7  …main() {                
+  8 -…mt.Println("Hello, worl…  8 +…ontent := "Hello, world…
+                                9 +…mt.Println(content)     
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf06.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …ain() {                   7  …ain() {                 
+  8 -…t.Println("Hello, world…  8 +…ntent := "Hello, world!"
+                                9 +…t.Println(content)      
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf07.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …in() {                    7  …in() {                  
+  8 -….Println("Hello, world!…  8 +…tent := "Hello, world!" 
+                                9 +….Println(content)       
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf08.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …n() {                     7  …n() {                   
+  8 -…Println("Hello, world!")  8 +…ent := "Hello, world!"  
+                                9 +…Println(content)        
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf09.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …() {                      7  …() {                    
+  8 -…rintln("Hello, world!")   8 +…nt := "Hello, world!"   
+                                9 +…rintln(content)         
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf10.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …) {                       7  …) {                     
+  8 -…intln("Hello, world!")    8 +…t := "Hello, world!"    
+                                9 +…intln(content)          
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf11.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  … {                        7  … {                      
+  8 -…ntln("Hello, world!")     8 +… := "Hello, world!"     
+                                9 +…ntln(content)           
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf12.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …{                         7  …{                       
+  8 -…tln("Hello, world!")      8 +…:= "Hello, world!"      
+                                9 +…tln(content)            
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf13.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …                          7  …                        
+  8 -…ln("Hello, world!")       8 +…= "Hello, world!"       
+                                9 +…ln(content)             
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf14.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …                          7  …                        
+  8 -…n("Hello, world!")        8 +… "Hello, world!"        
+                                9 +…n(content)              
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf15.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …                          7  …                        
+  8 -…("Hello, world!")         8 +…"Hello, world!"         
+                                9 +…(content)               
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf16.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …                          7  …                        
+  8 -…"Hello, world!")          8 +…Hello, world!"          
+                                9 +…content)                
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf17.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …                          7  …                        
+  8 -…Hello, world!")           8 +…ello, world!"           
+                                9 +…ontent)                 
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf18.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …                          7  …                        
+  8 -…ello, world!")            8 +…llo, world!"            
+                                9 +…ntent)                  
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf19.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …                          7  …                        
+  8 -…llo, world!")             8 +…lo, world!"             
+                                9 +…tent)                   
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Split/XOffsetOf20.golden 🔗

@@ -0,0 +1,7 @@
+  …   @@ -5,5 +5,6 @@           …                           
+  5  …                          5  …                        
+  6                             6                           
+  7  …                          7  …                        
+  8 -…lo, world!")              8 +…o, world!"              
+                                9 +…ent)                    
+  9  …                         10  …                        

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf00.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5   )                                                 
+  6   6                                                     
+  7   7   func main() {                                     
+  8     -     fmt.Println("Hello, world!")                  
+      8 +     content := "Hello, world!"                    
+      9 +     fmt.Println(content)                          
+  9  10   }                                                 

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf01.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …unc main() {                                      
+  8     -…   fmt.Println("Hello, world!")                   
+      8 +…   content := "Hello, world!"                     
+      9 +…   fmt.Println(content)                           
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf02.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …nc main() {                                       
+  8     -…  fmt.Println("Hello, world!")                    
+      8 +…  content := "Hello, world!"                      
+      9 +…  fmt.Println(content)                            
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf03.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …c main() {                                        
+  8     -… fmt.Println("Hello, world!")                     
+      8 +… content := "Hello, world!"                       
+      9 +… fmt.Println(content)                             
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf04.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  … main() {                                         
+  8     -…fmt.Println("Hello, world!")                      
+      8 +…content := "Hello, world!"                        
+      9 +…fmt.Println(content)                              
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf05.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …main() {                                          
+  8     -…mt.Println("Hello, world!")                       
+      8 +…ontent := "Hello, world!"                         
+      9 +…mt.Println(content)                               
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf06.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …ain() {                                           
+  8     -…t.Println("Hello, world!")                        
+      8 +…ntent := "Hello, world!"                          
+      9 +…t.Println(content)                                
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf07.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …in() {                                            
+  8     -….Println("Hello, world!")                         
+      8 +…tent := "Hello, world!"                           
+      9 +….Println(content)                                 
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf08.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …n() {                                             
+  8     -…Println("Hello, world!")                          
+      8 +…ent := "Hello, world!"                            
+      9 +…Println(content)                                  
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf09.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …() {                                              
+  8     -…rintln("Hello, world!")                           
+      8 +…nt := "Hello, world!"                             
+      9 +…rintln(content)                                   
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf10.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …) {                                               
+  8     -…intln("Hello, world!")                            
+      8 +…t := "Hello, world!"                              
+      9 +…intln(content)                                    
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf11.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  … {                                                
+  8     -…ntln("Hello, world!")                             
+      8 +… := "Hello, world!"                               
+      9 +…ntln(content)                                     
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf12.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …{                                                 
+  8     -…tln("Hello, world!")                              
+      8 +…:= "Hello, world!"                                
+      9 +…tln(content)                                      
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf13.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …                                                  
+  8     -…ln("Hello, world!")                               
+      8 +…= "Hello, world!"                                 
+      9 +…ln(content)                                       
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf14.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …                                                  
+  8     -…n("Hello, world!")                                
+      8 +… "Hello, world!"                                  
+      9 +…n(content)                                        
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf15.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …                                                  
+  8     -…("Hello, world!")                                 
+      8 +…"Hello, world!"                                   
+      9 +…(content)                                         
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf16.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …                                                  
+  8     -…"Hello, world!")                                  
+      8 +…Hello, world!"                                    
+      9 +…content)                                          
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf17.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …                                                  
+  8     -…Hello, world!")                                   
+      8 +…ello, world!"                                     
+      9 +…ontent)                                           
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf18.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …                                                  
+  8     -…ello, world!")                                    
+      8 +…llo, world!"                                      
+      9 +…ntent)                                            
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf19.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …                                                  
+  8     -…llo, world!")                                     
+      8 +…lo, world!"                                       
+      9 +…tent)                                             
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewXOffset/Unified/XOffsetOf20.golden 🔗

@@ -0,0 +1,8 @@
+  …   …   @@ -5,5 +5,6 @@                                   
+  5   5  …                                                  
+  6   6  …                                                  
+  7   7  …                                                  
+  8     -…lo, world!")                                      
+      8 +…o, world!"                                        
+      9 +…ent)                                              
+  9  10  …                                                  

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf00.golden 🔗

@@ -0,0 +1,5 @@
+  …   @@ -2,6 +2,7 @@                                   …                                                   
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf01.golden 🔗

@@ -0,0 +1,5 @@
+  2                                                     2                                                   
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf02.golden 🔗

@@ -0,0 +1,5 @@
+  3   import (                                          3   import (                                        
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf03.golden 🔗

@@ -0,0 +1,5 @@
+  4       "fmt"                                         4       "fmt"                                       
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf04.golden 🔗

@@ -0,0 +1,5 @@
+                                                        5 +     "strings"                                   
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf05.golden 🔗

@@ -0,0 +1,5 @@
+  5   )                                                 6   )                                               
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf06.golden 🔗

@@ -0,0 +1,5 @@
+  6                                                     7                                                   
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf07.golden 🔗

@@ -0,0 +1,5 @@
+  7   func main() {                                     8   func main() {                                   
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf08.golden 🔗

@@ -0,0 +1,5 @@
+  …   @@ -9,5 +10,6 @@                                  …                                                   
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      
+  …   …                                                 …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf09.golden 🔗

@@ -0,0 +1,5 @@
+  9   }                                                10   }                                               
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf10.golden 🔗

@@ -0,0 +1,5 @@
+ 10                                                    11                                                   
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf11.golden 🔗

@@ -0,0 +1,5 @@
+ 11   func getContent() string {                       12   func getContent() string {                      

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf13.golden 🔗

@@ -0,0 +1,5 @@
+                                                       14 +     return content                              
+ 13   }                                                15   }                                               
+                                                                                                            
+                                                                                                            
+                                                                                                            

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf14.golden 🔗

@@ -0,0 +1,5 @@
+ 13   }                                                15   }                                               
+                                                                                                            
+                                                                                                            
+                                                                                                            
+                                                                                                            

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf15.golden 🔗

@@ -0,0 +1,5 @@
+                                                                                                            
+                                                                                                            
+                                                                                                            
+                                                                                                            
+                                                                                                            

internal/exp/diffview/testdata/TestDiffViewYOffset/Split/YOffsetOf16.golden 🔗

@@ -0,0 +1,5 @@
+                                                                                                            
+                                                                                                            
+                                                                                                            
+                                                                                                            
+                                                                                                            

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf00.golden 🔗

@@ -0,0 +1,5 @@
+  …   …   @@ -2,6 +2,7 @@                                 
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf01.golden 🔗

@@ -0,0 +1,5 @@
+  2   2                                                   
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf02.golden 🔗

@@ -0,0 +1,5 @@
+  3   3   import (                                        
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf03.golden 🔗

@@ -0,0 +1,5 @@
+  4   4       "fmt"                                       
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf04.golden 🔗

@@ -0,0 +1,5 @@
+      5 +     "strings"                                   
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf05.golden 🔗

@@ -0,0 +1,5 @@
+  5   6   )                                               
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf06.golden 🔗

@@ -0,0 +1,5 @@
+  6   7                                                   
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf07.golden 🔗

@@ -0,0 +1,5 @@
+  7   8   func main() {                                   
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf08.golden 🔗

@@ -0,0 +1,5 @@
+  …   …   @@ -9,5 +10,6 @@                                
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf09.golden 🔗

@@ -0,0 +1,5 @@
+  9  10   }                                               
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf10.golden 🔗

@@ -0,0 +1,5 @@
+ 10  11                                                   
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+  …   …   …                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf11.golden 🔗

@@ -0,0 +1,5 @@
+ 11  12   func getContent() string {                      
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf12.golden 🔗

@@ -0,0 +1,5 @@
+ 12     -     return "Hello, world!"                      
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               
+                                                          

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf13.golden 🔗

@@ -0,0 +1,5 @@
+     13 +     content := strings.ToUpper("Hello, World!") 
+     14 +     return content                              
+ 13  15   }                                               
+                                                          
+                                                          

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf14.golden 🔗

@@ -0,0 +1,5 @@
+     14 +     return content                              
+ 13  15   }                                               
+                                                          
+                                                          
+                                                          

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf15.golden 🔗

@@ -0,0 +1,5 @@
+ 13  15   }                                               
+                                                          
+                                                          
+                                                          
+                                                          

internal/exp/diffview/testdata/TestDiffViewYOffset/Unified/YOffsetOf16.golden 🔗

@@ -0,0 +1,5 @@
+                                                          
+                                                          
+                                                          
+                                                          
+                                                          

internal/exp/diffview/testdata/TestTabs.after 🔗

@@ -0,0 +1,15 @@
+package main
+
+import (
+	"fmt"
+	"strings"
+)
+
+func main() {
+	fmt.Println(getContent())
+}
+
+func getContent() string {
+	content := strings.ToUpper("Hello, World!")
+	return content
+}

internal/exp/diffview/testdata/TestUdiff/ToUnifiedDiff/DefaultContextLines/JSON.golden 🔗

@@ -0,0 +1,40 @@
+{
+  "From": "main.go",
+  "To": "main.go",
+  "Hunks": [
+    {
+      "FromLine": 5,
+      "ToLine": 5,
+      "Lines": [
+        {
+          "Kind": 2,
+          "Content": "\t)\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\tfunc main() {\n"
+        },
+        {
+          "Kind": 0,
+          "Content": "\t\tfmt.Println(\"Hello, World!\")\n"
+        },
+        {
+          "Kind": 1,
+          "Content": "\t\tcontent := \"Hello, World!\"\n"
+        },
+        {
+          "Kind": 1,
+          "Content": "\t\tfmt.Println(content)\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\t}"
+        }
+      ]
+    }
+  ]
+}

internal/exp/diffview/testdata/TestUdiff/ToUnifiedDiff/DefaultContextLinesPlusOne/JSON.golden 🔗

@@ -0,0 +1,44 @@
+{
+  "From": "main.go",
+  "To": "main.go",
+  "Hunks": [
+    {
+      "FromLine": 4,
+      "ToLine": 4,
+      "Lines": [
+        {
+          "Kind": 2,
+          "Content": "\t\t\"fmt\"\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\t)\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\tfunc main() {\n"
+        },
+        {
+          "Kind": 0,
+          "Content": "\t\tfmt.Println(\"Hello, World!\")\n"
+        },
+        {
+          "Kind": 1,
+          "Content": "\t\tcontent := \"Hello, World!\"\n"
+        },
+        {
+          "Kind": 1,
+          "Content": "\t\tfmt.Println(content)\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\t}"
+        }
+      ]
+    }
+  ]
+}

internal/exp/diffview/testdata/TestUdiff/ToUnifiedDiff/DefaultContextLinesPlusTwo/JSON.golden 🔗

@@ -0,0 +1,48 @@
+{
+  "From": "main.go",
+  "To": "main.go",
+  "Hunks": [
+    {
+      "FromLine": 3,
+      "ToLine": 3,
+      "Lines": [
+        {
+          "Kind": 2,
+          "Content": "\timport (\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\t\t\"fmt\"\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\t)\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\tfunc main() {\n"
+        },
+        {
+          "Kind": 0,
+          "Content": "\t\tfmt.Println(\"Hello, World!\")\n"
+        },
+        {
+          "Kind": 1,
+          "Content": "\t\tcontent := \"Hello, World!\"\n"
+        },
+        {
+          "Kind": 1,
+          "Content": "\t\tfmt.Println(content)\n"
+        },
+        {
+          "Kind": 2,
+          "Content": "\t}"
+        }
+      ]
+    }
+  ]
+}

internal/exp/diffview/udiff_test.go 🔗

@@ -0,0 +1,92 @@
+package diffview_test
+
+import (
+	"bytes"
+	"encoding/json"
+	"testing"
+
+	"github.com/aymanbagabas/go-udiff"
+	"github.com/aymanbagabas/go-udiff/myers"
+	"github.com/charmbracelet/x/exp/golden"
+)
+
+func TestUdiff(t *testing.T) {
+	before := `package main
+
+	import (
+		"fmt"
+	)
+
+	func main() {
+		fmt.Println("Hello, World!")
+	}`
+
+	after := `package main
+
+	import (
+		"fmt"
+	)
+
+	func main() {
+		content := "Hello, World!"
+		fmt.Println(content)
+	}`
+
+	t.Run("Unified", func(t *testing.T) {
+		content := udiff.Unified("main.go", "main.go", before, after)
+		golden.RequireEqual(t, []byte(content))
+	})
+
+	t.Run("ToUnifiedDiff", func(t *testing.T) {
+		toUnifiedDiff := func(t *testing.T, before, after string, contextLines int) udiff.UnifiedDiff {
+			edits := myers.ComputeEdits(before, after) //nolint:staticcheck
+			unifiedDiff, err := udiff.ToUnifiedDiff("main.go", "main.go", before, edits, contextLines)
+			if err != nil {
+				t.Fatalf("ToUnifiedDiff failed: %v", err)
+			}
+			return unifiedDiff
+		}
+		toJSON := func(t *testing.T, unifiedDiff udiff.UnifiedDiff) []byte {
+			var buff bytes.Buffer
+			encoder := json.NewEncoder(&buff)
+			encoder.SetIndent("", "  ")
+			if err := encoder.Encode(unifiedDiff); err != nil {
+				t.Fatalf("Failed to encode unified diff: %v", err)
+			}
+			return buff.Bytes()
+		}
+
+		t.Run("DefaultContextLines", func(t *testing.T) {
+			unifiedDiff := toUnifiedDiff(t, before, after, udiff.DefaultContextLines)
+
+			t.Run("Content", func(t *testing.T) {
+				golden.RequireEqual(t, []byte(unifiedDiff.String()))
+			})
+			t.Run("JSON", func(t *testing.T) {
+				golden.RequireEqual(t, toJSON(t, unifiedDiff))
+			})
+		})
+
+		t.Run("DefaultContextLinesPlusOne", func(t *testing.T) {
+			unifiedDiff := toUnifiedDiff(t, before, after, udiff.DefaultContextLines+1)
+
+			t.Run("Content", func(t *testing.T) {
+				golden.RequireEqual(t, []byte(unifiedDiff.String()))
+			})
+			t.Run("JSON", func(t *testing.T) {
+				golden.RequireEqual(t, toJSON(t, unifiedDiff))
+			})
+		})
+
+		t.Run("DefaultContextLinesPlusTwo", func(t *testing.T) {
+			unifiedDiff := toUnifiedDiff(t, before, after, udiff.DefaultContextLines+2)
+
+			t.Run("Content", func(t *testing.T) {
+				golden.RequireEqual(t, []byte(unifiedDiff.String()))
+			})
+			t.Run("JSON", func(t *testing.T) {
+				golden.RequireEqual(t, toJSON(t, unifiedDiff))
+			})
+		})
+	})
+}

internal/exp/diffview/util.go 🔗

@@ -0,0 +1,39 @@
+package diffview
+
+import (
+	"fmt"
+	"strings"
+
+	"github.com/charmbracelet/x/ansi"
+)
+
+func pad(v any, width int) string {
+	s := fmt.Sprintf("%v", v)
+	w := ansi.StringWidth(s)
+	if w >= width {
+		return s
+	}
+	return strings.Repeat(" ", width-w) + s
+}
+
+func isEven(n int) bool {
+	return n%2 == 0
+}
+
+func isOdd(n int) bool {
+	return !isEven(n)
+}
+
+func btoi(b bool) int {
+	if b {
+		return 1
+	}
+	return 0
+}
+
+func ternary[T any](cond bool, t, f T) T {
+	if cond {
+		return t
+	}
+	return f
+}

internal/exp/diffview/util_test.go 🔗

@@ -0,0 +1,27 @@
+package diffview
+
+import (
+	"testing"
+)
+
+func TestPad(t *testing.T) {
+	tests := []struct {
+		input    any
+		width    int
+		expected string
+	}{
+		{7, 2, " 7"},
+		{7, 3, "  7"},
+		{"a", 2, " a"},
+		{"a", 3, "  a"},
+		{"…", 2, " …"},
+		{"…", 3, "  …"},
+	}
+
+	for _, tt := range tests {
+		result := pad(tt.input, tt.width)
+		if result != tt.expected {
+			t.Errorf("expected %q, got %q", tt.expected, result)
+		}
+	}
+}

internal/fileutil/fileutil.go → internal/fsext/fileutil.go 🔗

@@ -1,4 +1,4 @@
-package fileutil
+package fsext
 
 import (
 	"fmt"
@@ -211,3 +211,27 @@ func PrettyPath(path string) string {
 	}
 	return path
 }
+
+func DirTrim(pwd string, lim int) string {
+	var (
+		out string
+		sep = string(filepath.Separator)
+	)
+	dirs := strings.Split(pwd, sep)
+	if lim > len(dirs)-1 || lim <= 0 {
+		return pwd
+	}
+	for i := len(dirs) - 1; i > 0; i-- {
+		out = sep + out
+		if i == len(dirs)-1 {
+			out = dirs[i]
+		} else if i >= len(dirs)-lim {
+			out = string(dirs[i][0]) + out
+		} else {
+			out = "..." + out
+			break
+		}
+	}
+	out = filepath.Join("~", out)
+	return out
+}

internal/history/file.go 🔗

@@ -4,9 +4,7 @@ import (
 	"context"
 	"database/sql"
 	"fmt"
-	"strconv"
 	"strings"
-	"time"
 
 	"github.com/charmbracelet/crush/internal/db"
 	"github.com/charmbracelet/crush/internal/pubsub"
@@ -14,7 +12,7 @@ import (
 )
 
 const (
-	InitialVersion = "initial"
+	InitialVersion = 0
 )
 
 type File struct {
@@ -22,7 +20,7 @@ type File struct {
 	SessionID string
 	Path      string
 	Content   string
-	Version   string
+	Version   int64
 	CreatedAt int64
 	UpdatedAt int64
 }
@@ -35,7 +33,6 @@ type Service interface {
 	GetByPathAndSession(ctx context.Context, path, sessionID string) (File, error)
 	ListBySession(ctx context.Context, sessionID string) ([]File, error)
 	ListLatestSessionFiles(ctx context.Context, sessionID string) ([]File, error)
-	Update(ctx context.Context, file File) (File, error)
 	Delete(ctx context.Context, id string) error
 	DeleteSessionFiles(ctx context.Context, sessionID string) error
 }
@@ -71,30 +68,13 @@ func (s *service) CreateVersion(ctx context.Context, sessionID, path, content st
 	}
 
 	// Get the latest version
-	latestFile := files[0] // Files are ordered by created_at DESC
-	latestVersion := latestFile.Version
-
-	// Generate the next version
-	var nextVersion string
-	if latestVersion == InitialVersion {
-		nextVersion = "v1"
-	} else if strings.HasPrefix(latestVersion, "v") {
-		versionNum, err := strconv.Atoi(latestVersion[1:])
-		if err != nil {
-			// If we can't parse the version, just use a timestamp-based version
-			nextVersion = fmt.Sprintf("v%d", latestFile.CreatedAt)
-		} else {
-			nextVersion = fmt.Sprintf("v%d", versionNum+1)
-		}
-	} else {
-		// If the version format is unexpected, use a timestamp-based version
-		nextVersion = fmt.Sprintf("v%d", latestFile.CreatedAt)
-	}
+	latestFile := files[0] // Files are ordered by version DESC, created_at DESC
+	nextVersion := latestFile.Version + 1
 
 	return s.createWithVersion(ctx, sessionID, path, content, nextVersion)
 }
 
-func (s *service) createWithVersion(ctx context.Context, sessionID, path, content, version string) (File, error) {
+func (s *service) createWithVersion(ctx context.Context, sessionID, path, content string, version int64) (File, error) {
 	// Maximum number of retries for transaction conflicts
 	const maxRetries = 3
 	var file File
@@ -126,16 +106,8 @@ func (s *service) createWithVersion(ctx context.Context, sessionID, path, conten
 			// Check if this is a uniqueness constraint violation
 			if strings.Contains(txErr.Error(), "UNIQUE constraint failed") {
 				if attempt < maxRetries-1 {
-					// If we have retries left, generate a new version and try again
-					if strings.HasPrefix(version, "v") {
-						versionNum, parseErr := strconv.Atoi(version[1:])
-						if parseErr == nil {
-							version = fmt.Sprintf("v%d", versionNum+1)
-							continue
-						}
-					}
-					// If we can't parse the version, use a timestamp-based version
-					version = fmt.Sprintf("v%d", time.Now().Unix())
+					// If we have retries left, increment version and try again
+					version++
 					continue
 				}
 			}
@@ -198,20 +170,6 @@ func (s *service) ListLatestSessionFiles(ctx context.Context, sessionID string)
 	return files, nil
 }
 
-func (s *service) Update(ctx context.Context, file File) (File, error) {
-	dbFile, err := s.q.UpdateFile(ctx, db.UpdateFileParams{
-		ID:      file.ID,
-		Content: file.Content,
-		Version: file.Version,
-	})
-	if err != nil {
-		return File{}, err
-	}
-	updatedFile := s.fromDBItem(dbFile)
-	s.Publish(pubsub.UpdatedEvent, updatedFile)
-	return updatedFile, nil
-}
-
 func (s *service) Delete(ctx context.Context, id string) error {
 	file, err := s.Get(ctx, id)
 	if err != nil {

internal/llm/agent/agent.go 🔗

@@ -163,7 +163,9 @@ func (a *agent) generateTitle(ctx context.Context, sessionID string, content str
 		return err
 	}
 	parts := []message.ContentPart{message.TextContent{Text: content}}
-	response, err := a.titleProvider.SendMessages(
+
+	// Use streaming approach like summarization
+	response := a.titleProvider.StreamResponse(
 		ctx,
 		[]message.Message{
 			{
@@ -173,11 +175,20 @@ func (a *agent) generateTitle(ctx context.Context, sessionID string, content str
 		},
 		make([]tools.BaseTool, 0),
 	)
-	if err != nil {
-		return err
+
+	var finalResponse *provider.ProviderResponse
+	for r := range response {
+		if r.Error != nil {
+			return r.Error
+		}
+		finalResponse = r.Response
+	}
+
+	if finalResponse == nil {
+		return fmt.Errorf("no response received from title provider")
 	}
 
-	title := strings.TrimSpace(strings.ReplaceAll(response.Content, "\n", " "))
+	title := strings.TrimSpace(strings.ReplaceAll(finalResponse.Content, "\n", " "))
 	if title == "" {
 		return nil
 	}
@@ -241,7 +252,7 @@ func (a *agent) processGeneration(ctx context.Context, sessionID, content string
 				logging.ErrorPersist("panic while generating title")
 			})
 			titleErr := a.generateTitle(context.Background(), sessionID, content)
-			if titleErr != nil {
+			if titleErr != nil && !errors.Is(titleErr, context.Canceled) && !errors.Is(titleErr, context.DeadlineExceeded) {
 				logging.ErrorPersist(fmt.Sprintf("failed to generate title: %v", titleErr))
 			}
 		}()

internal/llm/agent/tools.go 🔗

@@ -33,7 +33,6 @@ func CoderAgentTools(
 			tools.NewLsTool(),
 			tools.NewSourcegraphTool(),
 			tools.NewViewTool(lspClients),
-			tools.NewPatchTool(lspClients, permissions, history),
 			tools.NewWriteTool(lspClients, permissions, history),
 			NewAgentTool(sessions, messages, lspClients),
 		}, otherTools...,

internal/llm/tools/edit.go 🔗

@@ -24,14 +24,16 @@ type EditParams struct {
 }
 
 type EditPermissionsParams struct {
-	FilePath string `json:"file_path"`
-	Diff     string `json:"diff"`
+	FilePath   string `json:"file_path"`
+	OldContent string `json:"old_content,omitempty"`
+	NewContent string `json:"new_content,omitempty"`
 }
 
 type EditResponseMetadata struct {
-	Diff      string `json:"diff"`
-	Additions int    `json:"additions"`
-	Removals  int    `json:"removals"`
+	Additions  int    `json:"additions"`
+	Removals   int    `json:"removals"`
+	OldContent string `json:"old_content,omitempty"`
+	NewContent string `json:"new_content,omitempty"`
 }
 
 type editTool struct {
@@ -191,7 +193,7 @@ func (e *editTool) createNewFile(ctx context.Context, filePath, content string)
 		return ToolResponse{}, fmt.Errorf("session ID and message ID are required for creating a new file")
 	}
 
-	diff, additions, removals := diff.GenerateDiff(
+	_, additions, removals := diff.GenerateDiff(
 		"",
 		content,
 		filePath,
@@ -209,8 +211,9 @@ func (e *editTool) createNewFile(ctx context.Context, filePath, content string)
 			Action:      "write",
 			Description: fmt.Sprintf("Create file %s", filePath),
 			Params: EditPermissionsParams{
-				FilePath: filePath,
-				Diff:     diff,
+				FilePath:   filePath,
+				OldContent: "",
+				NewContent: content,
 			},
 		},
 	)
@@ -243,9 +246,10 @@ func (e *editTool) createNewFile(ctx context.Context, filePath, content string)
 	return WithResponseMetadata(
 		NewTextResponse("File created: "+filePath),
 		EditResponseMetadata{
-			Diff:      diff,
-			Additions: additions,
-			Removals:  removals,
+			OldContent: "",
+			NewContent: content,
+			Additions:  additions,
+			Removals:   removals,
 		},
 	), nil
 }
@@ -301,7 +305,7 @@ func (e *editTool) deleteContent(ctx context.Context, filePath, oldString string
 		return ToolResponse{}, fmt.Errorf("session ID and message ID are required for creating a new file")
 	}
 
-	diff, additions, removals := diff.GenerateDiff(
+	_, additions, removals := diff.GenerateDiff(
 		oldContent,
 		newContent,
 		filePath,
@@ -320,8 +324,9 @@ func (e *editTool) deleteContent(ctx context.Context, filePath, oldString string
 			Action:      "write",
 			Description: fmt.Sprintf("Delete content from file %s", filePath),
 			Params: EditPermissionsParams{
-				FilePath: filePath,
-				Diff:     diff,
+				FilePath:   filePath,
+				OldContent: oldContent,
+				NewContent: newContent,
 			},
 		},
 	)
@@ -362,9 +367,10 @@ func (e *editTool) deleteContent(ctx context.Context, filePath, oldString string
 	return WithResponseMetadata(
 		NewTextResponse("Content deleted from file: "+filePath),
 		EditResponseMetadata{
-			Diff:      diff,
-			Additions: additions,
-			Removals:  removals,
+			OldContent: oldContent,
+			NewContent: newContent,
+			Additions:  additions,
+			Removals:   removals,
 		},
 	), nil
 }
@@ -422,7 +428,7 @@ func (e *editTool) replaceContent(ctx context.Context, filePath, oldString, newS
 	if sessionID == "" || messageID == "" {
 		return ToolResponse{}, fmt.Errorf("session ID and message ID are required for creating a new file")
 	}
-	diff, additions, removals := diff.GenerateDiff(
+	_, additions, removals := diff.GenerateDiff(
 		oldContent,
 		newContent,
 		filePath,
@@ -440,8 +446,9 @@ func (e *editTool) replaceContent(ctx context.Context, filePath, oldString, newS
 			Action:      "write",
 			Description: fmt.Sprintf("Replace content in file %s", filePath),
 			Params: EditPermissionsParams{
-				FilePath: filePath,
-				Diff:     diff,
+				FilePath:   filePath,
+				OldContent: oldContent,
+				NewContent: newContent,
 			},
 		},
 	)
@@ -482,8 +489,9 @@ func (e *editTool) replaceContent(ctx context.Context, filePath, oldString, newS
 	return WithResponseMetadata(
 		NewTextResponse("Content replaced in file: "+filePath),
 		EditResponseMetadata{
-			Diff:      diff,
-			Additions: additions,
-			Removals:  removals,
+			OldContent: oldContent,
+			NewContent: newContent,
+			Additions:  additions,
+			Removals:   removals,
 		}), nil
 }

internal/llm/tools/fetch.go 🔗

@@ -7,7 +7,6 @@ import (
 	"io"
 	"net/http"
 	"strings"
-	"sync"
 	"time"
 
 	md "github.com/JohannesKaufmann/html-to-markdown"
@@ -29,10 +28,8 @@ type FetchPermissionsParams struct {
 }
 
 type fetchTool struct {
-	client       *http.Client
-	clientPool   map[int]*http.Client
-	clientPoolMu sync.RWMutex
-	permissions  permission.Service
+	client      *http.Client
+	permissions permission.Service
 }
 
 const (
@@ -78,51 +75,10 @@ func NewFetchTool(permissions permission.Service) BaseTool {
 				IdleConnTimeout:     90 * time.Second,
 			},
 		},
-		clientPool:  make(map[int]*http.Client),
 		permissions: permissions,
 	}
 }
 
-// getClientForTimeout returns a cached client for the given timeout or the default client
-func (t *fetchTool) getClientForTimeout(timeout int) *http.Client {
-	if timeout <= 0 {
-		return t.client
-	}
-
-	maxTimeout := 120 // 2 minutes
-	if timeout > maxTimeout {
-		timeout = maxTimeout
-	}
-
-	// Check if we have a cached client for this timeout
-	t.clientPoolMu.RLock()
-	if client, exists := t.clientPool[timeout]; exists {
-		t.clientPoolMu.RUnlock()
-		return client
-	}
-	t.clientPoolMu.RUnlock()
-
-	// Create and cache a new client
-	t.clientPoolMu.Lock()
-	defer t.clientPoolMu.Unlock()
-
-	// Double-check in case another goroutine created it
-	if client, exists := t.clientPool[timeout]; exists {
-		return client
-	}
-
-	client := &http.Client{
-		Timeout: time.Duration(timeout) * time.Second,
-		Transport: &http.Transport{
-			MaxIdleConns:        100,
-			MaxIdleConnsPerHost: 10,
-			IdleConnTimeout:     90 * time.Second,
-		},
-	}
-	t.clientPool[timeout] = client
-	return client
-}
-
 func (t *fetchTool) Info() ToolInfo {
 	return ToolInfo{
 		Name:        FetchToolName,
@@ -185,16 +141,26 @@ func (t *fetchTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error
 		return ToolResponse{}, permission.ErrorPermissionDenied
 	}
 
-	client := t.getClientForTimeout(params.Timeout)
+	// Handle timeout with context
+	requestCtx := ctx
+	if params.Timeout > 0 {
+		maxTimeout := 120 // 2 minutes
+		if params.Timeout > maxTimeout {
+			params.Timeout = maxTimeout
+		}
+		var cancel context.CancelFunc
+		requestCtx, cancel = context.WithTimeout(ctx, time.Duration(params.Timeout)*time.Second)
+		defer cancel()
+	}
 
-	req, err := http.NewRequestWithContext(ctx, "GET", params.URL, nil)
+	req, err := http.NewRequestWithContext(requestCtx, "GET", params.URL, nil)
 	if err != nil {
 		return ToolResponse{}, fmt.Errorf("failed to create request: %w", err)
 	}
 
 	req.Header.Set("User-Agent", "crush/1.0")
 
-	resp, err := client.Do(req)
+	resp, err := t.client.Do(req)
 	if err != nil {
 		return ToolResponse{}, fmt.Errorf("failed to fetch URL: %w", err)
 	}

internal/llm/tools/glob.go 🔗

@@ -11,7 +11,7 @@ import (
 	"strings"
 
 	"github.com/charmbracelet/crush/internal/config"
-	"github.com/charmbracelet/crush/internal/fileutil"
+	"github.com/charmbracelet/crush/internal/fsext"
 	"github.com/charmbracelet/crush/internal/logging"
 )
 
@@ -127,7 +127,7 @@ func (g *globTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error)
 }
 
 func globFiles(pattern, searchPath string, limit int) ([]string, bool, error) {
-	cmdRg := fileutil.GetRgCmd(pattern)
+	cmdRg := fsext.GetRgCmd(pattern)
 	if cmdRg != nil {
 		cmdRg.Dir = searchPath
 		matches, err := runRipgrep(cmdRg, searchPath, limit)
@@ -137,7 +137,7 @@ func globFiles(pattern, searchPath string, limit int) ([]string, bool, error) {
 		logging.Warn(fmt.Sprintf("Ripgrep execution failed: %v. Falling back to doublestar.", err))
 	}
 
-	return fileutil.GlobWithDoubleStar(pattern, searchPath, limit)
+	return fsext.GlobWithDoubleStar(pattern, searchPath, limit)
 }
 
 func runRipgrep(cmd *exec.Cmd, searchRoot string, limit int) ([]string, error) {
@@ -158,7 +158,7 @@ func runRipgrep(cmd *exec.Cmd, searchRoot string, limit int) ([]string, error) {
 		if !filepath.IsAbs(absPath) {
 			absPath = filepath.Join(searchRoot, absPath)
 		}
-		if fileutil.SkipHidden(absPath) {
+		if fsext.SkipHidden(absPath) {
 			continue
 		}
 		matches = append(matches, absPath)

internal/llm/tools/grep.go 🔗

@@ -17,7 +17,7 @@ import (
 	"time"
 
 	"github.com/charmbracelet/crush/internal/config"
-	"github.com/charmbracelet/crush/internal/fileutil"
+	"github.com/charmbracelet/crush/internal/fsext"
 )
 
 // regexCache provides thread-safe caching of compiled regex patterns
@@ -342,7 +342,7 @@ func searchFilesWithRegex(pattern, rootPath, include string) ([]grepMatch, error
 			return nil // Skip directories
 		}
 
-		if fileutil.SkipHidden(path) {
+		if fsext.SkipHidden(path) {
 			return nil
 		}
 
@@ -402,19 +402,20 @@ func fileContainsPattern(filePath string, pattern *regexp.Regexp) (bool, int, st
 	return false, 0, "", scanner.Err()
 }
 
+var binaryExts = map[string]struct{}{
+	".exe": {}, ".dll": {}, ".so": {}, ".dylib": {},
+	".bin": {}, ".obj": {}, ".o": {}, ".a": {},
+	".zip": {}, ".tar": {}, ".gz": {}, ".bz2": {},
+	".jpg": {}, ".jpeg": {}, ".png": {}, ".gif": {},
+	".pdf": {}, ".doc": {}, ".docx": {}, ".xls": {},
+	".mp3": {}, ".mp4": {}, ".avi": {}, ".mov": {},
+}
+
 // isBinaryFile performs a quick check to determine if a file is binary
 func isBinaryFile(filePath string) bool {
 	// Check file extension first (fastest)
 	ext := strings.ToLower(filepath.Ext(filePath))
-	binaryExts := map[string]bool{
-		".exe": true, ".dll": true, ".so": true, ".dylib": true,
-		".bin": true, ".obj": true, ".o": true, ".a": true,
-		".zip": true, ".tar": true, ".gz": true, ".bz2": true,
-		".jpg": true, ".jpeg": true, ".png": true, ".gif": true,
-		".pdf": true, ".doc": true, ".docx": true, ".xls": true,
-		".mp3": true, ".mp4": true, ".avi": true, ".mov": true,
-	}
-	if binaryExts[ext] {
+	if _, isBinary := binaryExts[ext]; isBinary {
 		return true
 	}
 
@@ -433,7 +434,7 @@ func isBinaryFile(filePath string) bool {
 	}
 
 	// Check for null bytes (common in binary files)
-	for i := 0; i < n; i++ {
+	for i := range n {
 		if buffer[i] == 0 {
 			return true
 		}

internal/llm/tools/ls.go 🔗

@@ -9,7 +9,7 @@ import (
 	"strings"
 
 	"github.com/charmbracelet/crush/internal/config"
-	"github.com/charmbracelet/crush/internal/fileutil"
+	"github.com/charmbracelet/crush/internal/fsext"
 )
 
 type LSParams struct {
@@ -108,7 +108,7 @@ func (l *lsTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error) {
 		return NewTextErrorResponse(fmt.Sprintf("path does not exist: %s", searchPath)), nil
 	}
 
-	files, truncated, err := fileutil.ListDirectory(searchPath, params.Ignore, MaxLSFiles)
+	files, truncated, err := fsext.ListDirectory(searchPath, params.Ignore, MaxLSFiles)
 	if err != nil {
 		return ToolResponse{}, fmt.Errorf("error listing directory: %w", err)
 	}

internal/llm/tools/patch.go 🔗

@@ -1,372 +0,0 @@
-package tools
-
-import (
-	"context"
-	"encoding/json"
-	"fmt"
-	"os"
-	"path/filepath"
-	"time"
-
-	"github.com/charmbracelet/crush/internal/config"
-	"github.com/charmbracelet/crush/internal/diff"
-	"github.com/charmbracelet/crush/internal/history"
-	"github.com/charmbracelet/crush/internal/logging"
-	"github.com/charmbracelet/crush/internal/lsp"
-	"github.com/charmbracelet/crush/internal/permission"
-)
-
-type PatchParams struct {
-	PatchText string `json:"patch_text"`
-}
-
-type PatchResponseMetadata struct {
-	FilesChanged []string `json:"files_changed"`
-	Additions    int      `json:"additions"`
-	Removals     int      `json:"removals"`
-}
-
-type patchTool struct {
-	lspClients  map[string]*lsp.Client
-	permissions permission.Service
-	files       history.Service
-}
-
-const (
-	PatchToolName    = "patch"
-	patchDescription = `Applies a patch to multiple files in one operation. This tool is useful for making coordinated changes across multiple files.
-
-The patch text must follow this format:
-*** Begin Patch
-*** Update File: /path/to/file
-@@ Context line (unique within the file)
- Line to keep
--Line to remove
-+Line to add
- Line to keep
-*** Add File: /path/to/new/file
-+Content of the new file
-+More content
-*** Delete File: /path/to/file/to/delete
-*** End Patch
-
-Before using this tool:
-1. Use the FileRead tool to understand the files' contents and context
-2. Verify all file paths are correct (use the LS tool)
-
-CRITICAL REQUIREMENTS FOR USING THIS TOOL:
-
-1. UNIQUENESS: Context lines MUST uniquely identify the specific sections you want to change
-2. PRECISION: All whitespace, indentation, and surrounding code must match exactly
-3. VALIDATION: Ensure edits result in idiomatic, correct code
-4. PATHS: Always use absolute file paths (starting with /)
-
-The tool will apply all changes in a single atomic operation.`
-)
-
-func NewPatchTool(lspClients map[string]*lsp.Client, permissions permission.Service, files history.Service) BaseTool {
-	return &patchTool{
-		lspClients:  lspClients,
-		permissions: permissions,
-		files:       files,
-	}
-}
-
-func (p *patchTool) Info() ToolInfo {
-	return ToolInfo{
-		Name:        PatchToolName,
-		Description: patchDescription,
-		Parameters: map[string]any{
-			"patch_text": map[string]any{
-				"type":        "string",
-				"description": "The full patch text that describes all changes to be made",
-			},
-		},
-		Required: []string{"patch_text"},
-	}
-}
-
-func (p *patchTool) Run(ctx context.Context, call ToolCall) (ToolResponse, error) {
-	var params PatchParams
-	if err := json.Unmarshal([]byte(call.Input), &params); err != nil {
-		return NewTextErrorResponse("invalid parameters"), nil
-	}
-
-	if params.PatchText == "" {
-		return NewTextErrorResponse("patch_text is required"), nil
-	}
-
-	// Identify all files needed for the patch and verify they've been read
-	filesToRead := diff.IdentifyFilesNeeded(params.PatchText)
-	for _, filePath := range filesToRead {
-		absPath := filePath
-		if !filepath.IsAbs(absPath) {
-			wd := config.WorkingDirectory()
-			absPath = filepath.Join(wd, absPath)
-		}
-
-		if getLastReadTime(absPath).IsZero() {
-			return NewTextErrorResponse(fmt.Sprintf("you must read the file %s before patching it. Use the FileRead tool first", filePath)), nil
-		}
-
-		fileInfo, err := os.Stat(absPath)
-		if err != nil {
-			if os.IsNotExist(err) {
-				return NewTextErrorResponse(fmt.Sprintf("file not found: %s", absPath)), nil
-			}
-			return ToolResponse{}, fmt.Errorf("failed to access file: %w", err)
-		}
-
-		if fileInfo.IsDir() {
-			return NewTextErrorResponse(fmt.Sprintf("path is a directory, not a file: %s", absPath)), nil
-		}
-
-		modTime := fileInfo.ModTime()
-		lastRead := getLastReadTime(absPath)
-		if modTime.After(lastRead) {
-			return NewTextErrorResponse(
-				fmt.Sprintf("file %s has been modified since it was last read (mod time: %s, last read: %s)",
-					absPath, modTime.Format(time.RFC3339), lastRead.Format(time.RFC3339),
-				)), nil
-		}
-	}
-
-	// Check for new files to ensure they don't already exist
-	filesToAdd := diff.IdentifyFilesAdded(params.PatchText)
-	for _, filePath := range filesToAdd {
-		absPath := filePath
-		if !filepath.IsAbs(absPath) {
-			wd := config.WorkingDirectory()
-			absPath = filepath.Join(wd, absPath)
-		}
-
-		_, err := os.Stat(absPath)
-		if err == nil {
-			return NewTextErrorResponse(fmt.Sprintf("file already exists and cannot be added: %s", absPath)), nil
-		} else if !os.IsNotExist(err) {
-			return ToolResponse{}, fmt.Errorf("failed to check file: %w", err)
-		}
-	}
-
-	// Load all required files
-	currentFiles := make(map[string]string)
-	for _, filePath := range filesToRead {
-		absPath := filePath
-		if !filepath.IsAbs(absPath) {
-			wd := config.WorkingDirectory()
-			absPath = filepath.Join(wd, absPath)
-		}
-
-		content, err := os.ReadFile(absPath)
-		if err != nil {
-			return ToolResponse{}, fmt.Errorf("failed to read file %s: %w", absPath, err)
-		}
-		currentFiles[filePath] = string(content)
-	}
-
-	// Process the patch
-	patch, fuzz, err := diff.TextToPatch(params.PatchText, currentFiles)
-	if err != nil {
-		return NewTextErrorResponse(fmt.Sprintf("failed to parse patch: %s", err)), nil
-	}
-
-	if fuzz > 3 {
-		return NewTextErrorResponse(fmt.Sprintf("patch contains fuzzy matches (fuzz level: %d). Please make your context lines more precise", fuzz)), nil
-	}
-
-	// Convert patch to commit
-	commit, err := diff.PatchToCommit(patch, currentFiles)
-	if err != nil {
-		return NewTextErrorResponse(fmt.Sprintf("failed to create commit from patch: %s", err)), nil
-	}
-
-	// Get session ID and message ID
-	sessionID, messageID := GetContextValues(ctx)
-	if sessionID == "" || messageID == "" {
-		return ToolResponse{}, fmt.Errorf("session ID and message ID are required for creating a patch")
-	}
-
-	// Request permission for all changes
-	for path, change := range commit.Changes {
-		switch change.Type {
-		case diff.ActionAdd:
-			dir := filepath.Dir(path)
-			patchDiff, _, _ := diff.GenerateDiff("", *change.NewContent, path)
-			p := p.permissions.Request(
-				permission.CreatePermissionRequest{
-					SessionID:   sessionID,
-					Path:        dir,
-					ToolName:    PatchToolName,
-					Action:      "create",
-					Description: fmt.Sprintf("Create file %s", path),
-					Params: EditPermissionsParams{
-						FilePath: path,
-						Diff:     patchDiff,
-					},
-				},
-			)
-			if !p {
-				return ToolResponse{}, permission.ErrorPermissionDenied
-			}
-		case diff.ActionUpdate:
-			currentContent := ""
-			if change.OldContent != nil {
-				currentContent = *change.OldContent
-			}
-			newContent := ""
-			if change.NewContent != nil {
-				newContent = *change.NewContent
-			}
-			patchDiff, _, _ := diff.GenerateDiff(currentContent, newContent, path)
-			dir := filepath.Dir(path)
-			p := p.permissions.Request(
-				permission.CreatePermissionRequest{
-					SessionID:   sessionID,
-					Path:        dir,
-					ToolName:    PatchToolName,
-					Action:      "update",
-					Description: fmt.Sprintf("Update file %s", path),
-					Params: EditPermissionsParams{
-						FilePath: path,
-						Diff:     patchDiff,
-					},
-				},
-			)
-			if !p {
-				return ToolResponse{}, permission.ErrorPermissionDenied
-			}
-		case diff.ActionDelete:
-			dir := filepath.Dir(path)
-			patchDiff, _, _ := diff.GenerateDiff(*change.OldContent, "", path)
-			p := p.permissions.Request(
-				permission.CreatePermissionRequest{
-					SessionID:   sessionID,
-					Path:        dir,
-					ToolName:    PatchToolName,
-					Action:      "delete",
-					Description: fmt.Sprintf("Delete file %s", path),
-					Params: EditPermissionsParams{
-						FilePath: path,
-						Diff:     patchDiff,
-					},
-				},
-			)
-			if !p {
-				return ToolResponse{}, permission.ErrorPermissionDenied
-			}
-		}
-	}
-
-	// Apply the changes to the filesystem
-	err = diff.ApplyCommit(commit, func(path string, content string) error {
-		absPath := path
-		if !filepath.IsAbs(absPath) {
-			wd := config.WorkingDirectory()
-			absPath = filepath.Join(wd, absPath)
-		}
-
-		// Create parent directories if needed
-		dir := filepath.Dir(absPath)
-		if err := os.MkdirAll(dir, 0o755); err != nil {
-			return fmt.Errorf("failed to create parent directories for %s: %w", absPath, err)
-		}
-
-		return os.WriteFile(absPath, []byte(content), 0o644)
-	}, func(path string) error {
-		absPath := path
-		if !filepath.IsAbs(absPath) {
-			wd := config.WorkingDirectory()
-			absPath = filepath.Join(wd, absPath)
-		}
-		return os.Remove(absPath)
-	})
-	if err != nil {
-		return NewTextErrorResponse(fmt.Sprintf("failed to apply patch: %s", err)), nil
-	}
-
-	// Update file history for all modified files
-	changedFiles := []string{}
-	totalAdditions := 0
-	totalRemovals := 0
-
-	for path, change := range commit.Changes {
-		absPath := path
-		if !filepath.IsAbs(absPath) {
-			wd := config.WorkingDirectory()
-			absPath = filepath.Join(wd, absPath)
-		}
-		changedFiles = append(changedFiles, absPath)
-
-		oldContent := ""
-		if change.OldContent != nil {
-			oldContent = *change.OldContent
-		}
-
-		newContent := ""
-		if change.NewContent != nil {
-			newContent = *change.NewContent
-		}
-
-		// Calculate diff statistics
-		_, additions, removals := diff.GenerateDiff(oldContent, newContent, path)
-		totalAdditions += additions
-		totalRemovals += removals
-
-		// Update history
-		file, err := p.files.GetByPathAndSession(ctx, absPath, sessionID)
-		if err != nil && change.Type != diff.ActionAdd {
-			// If not adding a file, create history entry for existing file
-			_, err = p.files.Create(ctx, sessionID, absPath, oldContent)
-			if err != nil {
-				logging.Debug("Error creating file history", "error", err)
-			}
-		}
-
-		if err == nil && change.Type != diff.ActionAdd && file.Content != oldContent {
-			// User manually changed content, store intermediate version
-			_, err = p.files.CreateVersion(ctx, sessionID, absPath, oldContent)
-			if err != nil {
-				logging.Debug("Error creating file history version", "error", err)
-			}
-		}
-
-		// Store new version
-		if change.Type == diff.ActionDelete {
-			_, err = p.files.CreateVersion(ctx, sessionID, absPath, "")
-		} else {
-			_, err = p.files.CreateVersion(ctx, sessionID, absPath, newContent)
-		}
-		if err != nil {
-			logging.Debug("Error creating file history version", "error", err)
-		}
-
-		// Record file operations
-		recordFileWrite(absPath)
-		recordFileRead(absPath)
-	}
-
-	// Run LSP diagnostics on all changed files
-	for _, filePath := range changedFiles {
-		waitForLspDiagnostics(ctx, filePath, p.lspClients)
-	}
-
-	result := fmt.Sprintf("Patch applied successfully. %d files changed, %d additions, %d removals",
-		len(changedFiles), totalAdditions, totalRemovals)
-
-	diagnosticsText := ""
-	for _, filePath := range changedFiles {
-		diagnosticsText += getDiagnostics(filePath, p.lspClients)
-	}
-
-	if diagnosticsText != "" {
-		result += "\n\nDiagnostics:\n" + diagnosticsText
-	}
-
-	return WithResponseMetadata(
-		NewTextResponse(result),
-		PatchResponseMetadata{
-			FilesChanged: changedFiles,
-			Additions:    totalAdditions,
-			Removals:     totalRemovals,
-		}), nil
-}

internal/llm/tools/shell/comparison_test.go 🔗

@@ -3,7 +3,6 @@ package shell
 import (
 	"context"
 	"os"
-	"runtime"
 	"testing"
 	"time"
 
@@ -32,35 +31,6 @@ func TestShellPerformanceComparison(t *testing.T) {
 	t.Logf("Quick command took: %v", duration)
 }
 
-func TestShellCPUUsageComparison(t *testing.T) {
-	tmpDir, err := os.MkdirTemp("", "shell-test")
-	require.NoError(t, err)
-	defer os.RemoveAll(tmpDir)
-
-	shell := GetPersistentShell(tmpDir)
-	defer shell.Close()
-
-	// Measure CPU and memory usage during a longer command
-	var m1, m2 runtime.MemStats
-	runtime.GC()
-	runtime.ReadMemStats(&m1)
-
-	start := time.Now()
-	_, stderr, exitCode, _, err := shell.Exec(context.Background(), "sleep 0.1", 1000)
-	duration := time.Since(start)
-
-	runtime.ReadMemStats(&m2)
-
-	require.NoError(t, err)
-	assert.Equal(t, 0, exitCode)
-	assert.Empty(t, stderr)
-
-	memGrowth := m2.Alloc - m1.Alloc
-	t.Logf("Sleep 0.1s command took: %v", duration)
-	t.Logf("Memory growth during polling: %d bytes", memGrowth)
-	t.Logf("GC cycles during test: %d", m2.NumGC-m1.NumGC)
-}
-
 // Benchmark CPU usage during polling
 func BenchmarkShellPolling(b *testing.B) {
 	tmpDir, err := os.MkdirTemp("", "shell-bench")

internal/llm/tools/shell/shell_test.go 🔗

@@ -4,35 +4,10 @@ import (
 	"context"
 	"os"
 	"testing"
-	"time"
 
-	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
 
-func TestShellPerformanceImprovement(t *testing.T) {
-	// Create a temporary directory for the shell
-	tmpDir, err := os.MkdirTemp("", "shell-test")
-	require.NoError(t, err)
-	defer os.RemoveAll(tmpDir)
-
-	shell := GetPersistentShell(tmpDir)
-	defer shell.Close()
-
-	// Test that quick commands complete fast
-	start := time.Now()
-	stdout, stderr, exitCode, _, err := shell.Exec(context.Background(), "echo 'hello world'", 0)
-	duration := time.Since(start)
-
-	require.NoError(t, err)
-	assert.Equal(t, 0, exitCode)
-	assert.Contains(t, stdout, "hello world")
-	assert.Empty(t, stderr)
-
-	// Quick commands should complete very fast with our exponential backoff
-	assert.Less(t, duration, 50*time.Millisecond, "Quick command should complete fast with exponential backoff")
-}
-
 // Benchmark to measure CPU efficiency
 func BenchmarkShellQuickCommands(b *testing.B) {
 	tmpDir, err := os.MkdirTemp("", "shell-bench")

internal/llm/tools/sourcegraph.go 🔗

@@ -8,7 +8,6 @@ import (
 	"io"
 	"net/http"
 	"strings"
-	"sync"
 	"time"
 )
 
@@ -25,9 +24,7 @@ type SourcegraphResponseMetadata struct {
 }
 
 type sourcegraphTool struct {
-	client       *http.Client
-	clientPool   map[int]*http.Client
-	clientPoolMu sync.RWMutex
+	client *http.Client
 }
 
 const (
@@ -138,50 +135,9 @@ func NewSourcegraphTool() BaseTool {
 				IdleConnTimeout:     90 * time.Second,
 			},
 		},
-		clientPool: make(map[int]*http.Client),
 	}
 }
 
-// getClientForTimeout returns a cached client for the given timeout or the default client
-func (t *sourcegraphTool) getClientForTimeout(timeout int) *http.Client {
-	if timeout <= 0 {
-		return t.client
-	}
-
-	maxTimeout := 120 // 2 minutes
-	if timeout > maxTimeout {
-		timeout = maxTimeout
-	}
-
-	// Check if we have a cached client for this timeout
-	t.clientPoolMu.RLock()
-	if client, exists := t.clientPool[timeout]; exists {
-		t.clientPoolMu.RUnlock()
-		return client
-	}
-	t.clientPoolMu.RUnlock()
-
-	// Create and cache a new client
-	t.clientPoolMu.Lock()
-	defer t.clientPoolMu.Unlock()
-
-	// Double-check in case another goroutine created it
-	if client, exists := t.clientPool[timeout]; exists {
-		return client
-	}
-
-	client := &http.Client{
-		Timeout: time.Duration(timeout) * time.Second,
-		Transport: &http.Transport{
-			MaxIdleConns:        100,
-			MaxIdleConnsPerHost: 10,
-			IdleConnTimeout:     90 * time.Second,
-		},
-	}
-	t.clientPool[timeout] = client
-	return client
-}
-
 func (t *sourcegraphTool) Info() ToolInfo {
 	return ToolInfo{
 		Name:        SourcegraphToolName,
@@ -227,7 +183,18 @@ func (t *sourcegraphTool) Run(ctx context.Context, call ToolCall) (ToolResponse,
 	if params.ContextWindow <= 0 {
 		params.ContextWindow = 10 // Default context window
 	}
-	client := t.getClientForTimeout(params.Timeout)
+
+	// Handle timeout with context
+	requestCtx := ctx
+	if params.Timeout > 0 {
+		maxTimeout := 120 // 2 minutes
+		if params.Timeout > maxTimeout {
+			params.Timeout = maxTimeout
+		}
+		var cancel context.CancelFunc
+		requestCtx, cancel = context.WithTimeout(ctx, time.Duration(params.Timeout)*time.Second)
+		defer cancel()
+	}
 
 	type graphqlRequest struct {
 		Query     string `json:"query"`
@@ -248,7 +215,7 @@ func (t *sourcegraphTool) Run(ctx context.Context, call ToolCall) (ToolResponse,
 	graphqlQuery := string(graphqlQueryBytes)
 
 	req, err := http.NewRequestWithContext(
-		ctx,
+		requestCtx,
 		"POST",
 		"https://sourcegraph.com/.api/graphql",
 		bytes.NewBuffer([]byte(graphqlQuery)),
@@ -260,7 +227,7 @@ func (t *sourcegraphTool) Run(ctx context.Context, call ToolCall) (ToolResponse,
 	req.Header.Set("Content-Type", "application/json")
 	req.Header.Set("User-Agent", "crush/1.0")
 
-	resp, err := client.Do(req)
+	resp, err := t.client.Do(req)
 	if err != nil {
 		return ToolResponse{}, fmt.Errorf("failed to fetch URL: %w", err)
 	}

internal/lsp/watcher/watcher.go 🔗

@@ -257,7 +257,10 @@ func (w *WorkspaceWatcher) openHighPriorityFiles(ctx context.Context, serverName
 		}
 	}
 
-	// For each pattern, find and open matching files
+	// Collect all files to open first
+	var filesToOpen []string
+
+	// For each pattern, find matching files
 	for _, pattern := range patterns {
 		// Use doublestar.Glob to find files matching the pattern (supports ** patterns)
 		matches, err := doublestar.Glob(os.DirFS(w.workspacePath), pattern)
@@ -278,7 +281,23 @@ func (w *WorkspaceWatcher) openHighPriorityFiles(ctx context.Context, serverName
 				continue
 			}
 
-			// Open the file
+			filesToOpen = append(filesToOpen, fullPath)
+
+			// Limit the number of files per pattern
+			if len(filesToOpen) >= 5 && (serverName != "java" && serverName != "jdtls") {
+				break
+			}
+		}
+	}
+
+	// Open files in batches to reduce overhead
+	batchSize := 3
+	for i := 0; i < len(filesToOpen); i += batchSize {
+		end := min(i+batchSize, len(filesToOpen))
+
+		// Open batch of files
+		for j := i; j < end; j++ {
+			fullPath := filesToOpen[j]
 			if err := w.client.OpenFile(ctx, fullPath); err != nil {
 				if cnf.DebugLSP {
 					logging.Debug("Error opening high-priority file", "path", fullPath, "error", err)
@@ -289,14 +308,11 @@ func (w *WorkspaceWatcher) openHighPriorityFiles(ctx context.Context, serverName
 					logging.Debug("Opened high-priority file", "path", fullPath)
 				}
 			}
+		}
 
-			// Add a small delay to prevent overwhelming the server
-			time.Sleep(20 * time.Millisecond)
-
-			// Limit the number of files opened per pattern
-			if filesOpened >= 5 && (serverName != "java" && serverName != "jdtls") {
-				break
-			}
+		// Only add delay between batches, not individual files
+		if end < len(filesToOpen) {
+			time.Sleep(50 * time.Millisecond)
 		}
 	}
 

internal/tui/components/chat/editor/editor.go 🔗

@@ -12,7 +12,7 @@ import (
 	"github.com/charmbracelet/bubbles/v2/textarea"
 	tea "github.com/charmbracelet/bubbletea/v2"
 	"github.com/charmbracelet/crush/internal/app"
-	"github.com/charmbracelet/crush/internal/fileutil"
+	"github.com/charmbracelet/crush/internal/fsext"
 	"github.com/charmbracelet/crush/internal/logging"
 	"github.com/charmbracelet/crush/internal/message"
 	"github.com/charmbracelet/crush/internal/session"
@@ -327,7 +327,7 @@ func (m *editorCmp) SetPosition(x, y int) tea.Cmd {
 }
 
 func (m *editorCmp) startCompletions() tea.Msg {
-	files, _, _ := fileutil.ListDirectory(".", []string{}, 0)
+	files, _, _ := fsext.ListDirectory(".", []string{}, 0)
 	completionItems := make([]completions.Completion, 0, len(files))
 	for _, file := range files {
 		file = strings.TrimPrefix(file, "./")

internal/tui/components/chat/messages/messages.go 🔗

@@ -167,7 +167,7 @@ func (m *messageCmp) renderAssistantMessage() string {
 		case message.FinishReasonPermissionDenied:
 			infoMsg = "permission denied"
 		}
-		assistant := t.S().Muted.Render(fmt.Sprintf("⬡ %s (%s)", models.SupportedModels[m.message.Model].Name, infoMsg))
+		assistant := t.S().Muted.Render(fmt.Sprintf("%s %s (%s)", styles.ModelIcon, models.SupportedModels[m.message.Model].Name, infoMsg))
 		parts = append(parts, core.Section(assistant, m.textWidth()))
 	}
 

internal/tui/components/chat/messages/renderer.go 🔗

@@ -6,11 +6,11 @@ import (
 	"strings"
 	"time"
 
-	"github.com/charmbracelet/crush/internal/diff"
-	"github.com/charmbracelet/crush/internal/fileutil"
+	"github.com/charmbracelet/crush/internal/fsext"
 	"github.com/charmbracelet/crush/internal/highlight"
 	"github.com/charmbracelet/crush/internal/llm/agent"
 	"github.com/charmbracelet/crush/internal/llm/tools"
+	"github.com/charmbracelet/crush/internal/tui/components/core"
 	"github.com/charmbracelet/crush/internal/tui/styles"
 	"github.com/charmbracelet/lipgloss/v2"
 	"github.com/charmbracelet/lipgloss/v2/tree"
@@ -148,7 +148,6 @@ func init() {
 	registry.register(tools.GrepToolName, func() renderer { return grepRenderer{} })
 	registry.register(tools.LSToolName, func() renderer { return lsRenderer{} })
 	registry.register(tools.SourcegraphToolName, func() renderer { return sourcegraphRenderer{} })
-	registry.register(tools.PatchToolName, func() renderer { return patchRenderer{} })
 	registry.register(tools.DiagnosticsToolName, func() renderer { return diagnosticsRenderer{} })
 	registry.register(agent.AgentToolName, func() renderer { return agentRenderer{} })
 }
@@ -209,7 +208,7 @@ func (vr viewRenderer) Render(v *toolCallCmp) string {
 		return vr.renderError(v, "Invalid view parameters")
 	}
 
-	file := fileutil.PrettyPath(params.FilePath)
+	file := fsext.PrettyPath(params.FilePath)
 	args := newParamBuilder().
 		addMain(file).
 		addKeyValue("limit", formatNonZero(params.Limit)).
@@ -249,7 +248,7 @@ func (er editRenderer) Render(v *toolCallCmp) string {
 		return er.renderError(v, "Invalid edit parameters")
 	}
 
-	file := fileutil.PrettyPath(params.FilePath)
+	file := fsext.PrettyPath(params.FilePath)
 	args := newParamBuilder().addMain(file).build()
 
 	return er.renderWithParams(v, "Edit", args, func() string {
@@ -258,9 +257,12 @@ func (er editRenderer) Render(v *toolCallCmp) string {
 			return renderPlainContent(v, v.result.Content)
 		}
 
-		trunc := truncateHeight(meta.Diff, responseContextHeight)
-		diffView, _ := diff.FormatDiff(trunc, diff.WithTotalWidth(v.textWidth()-2))
-		return diffView
+		formatter := core.DiffFormatter().
+			Before(fsext.PrettyPath(params.FilePath), meta.OldContent).
+			After(fsext.PrettyPath(params.FilePath), meta.NewContent).
+			Split().
+			Width(v.textWidth() - 2) // -2 for padding
+		return formatter.String()
 	})
 }
 
@@ -280,7 +282,7 @@ func (wr writeRenderer) Render(v *toolCallCmp) string {
 		return wr.renderError(v, "Invalid write parameters")
 	}
 
-	file := fileutil.PrettyPath(params.FilePath)
+	file := fsext.PrettyPath(params.FilePath)
 	args := newParamBuilder().addMain(file).build()
 
 	return wr.renderWithParams(v, "Write", args, func() string {
@@ -410,7 +412,7 @@ func (lr lsRenderer) Render(v *toolCallCmp) string {
 	if path == "" {
 		path = "."
 	}
-	path = fileutil.PrettyPath(path)
+	path = fsext.PrettyPath(path)
 
 	args := newParamBuilder().addMain(path).build()
 
@@ -446,38 +448,6 @@ func (sr sourcegraphRenderer) Render(v *toolCallCmp) string {
 	})
 }
 
-// -----------------------------------------------------------------------------
-//  Patch renderer
-// -----------------------------------------------------------------------------
-
-// patchRenderer handles multi-file patches with change summaries
-type patchRenderer struct {
-	baseRenderer
-}
-
-// Render displays patch summary with file count and change statistics
-func (pr patchRenderer) Render(v *toolCallCmp) string {
-	var params tools.PatchParams
-	if err := pr.unmarshalParams(v.call.Input, &params); err != nil {
-		return pr.renderError(v, "Invalid patch parameters")
-	}
-
-	args := newParamBuilder().addMain("multiple files").build()
-
-	return pr.renderWithParams(v, "Patch", args, func() string {
-		var meta tools.PatchResponseMetadata
-		if err := pr.unmarshalParams(v.result.Metadata, &meta); err != nil {
-			return renderPlainContent(v, v.result.Content)
-		}
-
-		summary := fmt.Sprintf("Changed %d files (%d+ %d-)",
-			len(meta.FilesChanged), meta.Additions, meta.Removals)
-		filesList := strings.Join(meta.FilesChanged, "\n")
-
-		return renderPlainContent(v, summary+"\n\n"+filesList)
-	})
-}
-
 // -----------------------------------------------------------------------------
 //  Diagnostics renderer
 // -----------------------------------------------------------------------------
@@ -711,8 +681,6 @@ func prettifyToolName(name string) string {
 		return "View"
 	case tools.WriteToolName:
 		return "Write"
-	case tools.PatchToolName:
-		return "Patch"
 	default:
 		return name
 	}

internal/tui/components/chat/sidebar/sidebar.go 🔗

@@ -1,11 +1,22 @@
 package sidebar
 
 import (
+	"context"
+	"fmt"
 	"os"
+	"sort"
 	"strings"
+	"sync"
 
 	tea "github.com/charmbracelet/bubbletea/v2"
 	"github.com/charmbracelet/crush/internal/config"
+	"github.com/charmbracelet/crush/internal/diff"
+	"github.com/charmbracelet/crush/internal/fsext"
+	"github.com/charmbracelet/crush/internal/history"
+	"github.com/charmbracelet/crush/internal/llm/models"
+	"github.com/charmbracelet/crush/internal/logging"
+	"github.com/charmbracelet/crush/internal/lsp"
+	"github.com/charmbracelet/crush/internal/lsp/protocol"
 	"github.com/charmbracelet/crush/internal/pubsub"
 	"github.com/charmbracelet/crush/internal/session"
 	"github.com/charmbracelet/crush/internal/tui/components/chat"
@@ -16,12 +27,28 @@ import (
 	"github.com/charmbracelet/crush/internal/tui/util"
 	"github.com/charmbracelet/crush/internal/version"
 	"github.com/charmbracelet/lipgloss/v2"
+	"github.com/charmbracelet/x/ansi"
 )
 
 const (
 	logoBreakpoint = 65
 )
 
+type FileHistory struct {
+	initialVersion history.File
+	latestVersion  history.File
+}
+
+type SessionFile struct {
+	History   FileHistory
+	FilePath  string
+	Additions int
+	Deletions int
+}
+type SessionFilesMsg struct {
+	Files []SessionFile
+}
+
 type Sidebar interface {
 	util.Model
 	layout.Sizeable
@@ -32,10 +59,17 @@ type sidebarCmp struct {
 	session       session.Session
 	logo          string
 	cwd           string
+	lspClients    map[string]*lsp.Client
+	history       history.Service
+	// Using a sync map here because we might receive file history events concurrently
+	files sync.Map
 }
 
-func NewSidebarCmp() Sidebar {
-	return &sidebarCmp{}
+func NewSidebarCmp(history history.Service, lspClients map[string]*lsp.Client) Sidebar {
+	return &sidebarCmp{
+		lspClients: lspClients,
+		history:    history,
+	}
 }
 
 func (m *sidebarCmp) Init() tea.Cmd {
@@ -50,8 +84,19 @@ func (m *sidebarCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
 		if msg.ID != m.session.ID {
 			m.session = msg
 		}
+		return m, m.loadSessionFiles
+	case SessionFilesMsg:
+		m.files = sync.Map{}
+		for _, file := range msg.Files {
+			m.files.Store(file.FilePath, file)
+		}
+		return m, nil
+
 	case chat.SessionClearedMsg:
 		m.session = session.Session{}
+	case pubsub.Event[history.File]:
+		logging.Info("sidebar", "Received file history event", "file", msg.Payload.Path, "session", msg.Payload.SessionID)
+		return m, m.handleFileHistoryEvent(msg)
 	case pubsub.Event[session.Session]:
 		if msg.Type == pubsub.UpdatedEvent {
 			if m.session.ID == msg.Payload.ID {
@@ -74,6 +119,13 @@ func (m *sidebarCmp) View() tea.View {
 
 	parts = append(parts,
 		m.cwd,
+		"",
+		m.currentModelBlock(),
+	)
+	if m.session.ID != "" {
+		parts = append(parts, "", m.filesBlock())
+	}
+	parts = append(parts,
 		"",
 		m.lspBlock(),
 		"",
@@ -85,6 +137,91 @@ func (m *sidebarCmp) View() tea.View {
 	)
 }
 
+func (m *sidebarCmp) handleFileHistoryEvent(event pubsub.Event[history.File]) tea.Cmd {
+	return func() tea.Msg {
+		file := event.Payload
+		found := false
+		m.files.Range(func(key, value any) bool {
+			existing := value.(SessionFile)
+			if existing.FilePath == file.Path {
+				if existing.History.latestVersion.Version < file.Version {
+					existing.History.latestVersion = file
+				} else if file.Version == 0 {
+					existing.History.initialVersion = file
+				} else {
+					// If the version is not greater than the latest, we ignore it
+					return true
+				}
+				before := existing.History.initialVersion.Content
+				after := existing.History.latestVersion.Content
+				path := existing.History.initialVersion.Path
+				_, additions, deletions := diff.GenerateDiff(before, after, path)
+				existing.Additions = additions
+				existing.Deletions = deletions
+				m.files.Store(file.Path, existing)
+				found = true
+				return false
+			}
+			return true
+		})
+		if found {
+			return nil
+		}
+		sf := SessionFile{
+			History: FileHistory{
+				initialVersion: file,
+				latestVersion:  file,
+			},
+			FilePath:  file.Path,
+			Additions: 0,
+			Deletions: 0,
+		}
+		m.files.Store(file.Path, sf)
+		return nil
+	}
+}
+
+func (m *sidebarCmp) loadSessionFiles() tea.Msg {
+	files, err := m.history.ListBySession(context.Background(), m.session.ID)
+	if err != nil {
+		return util.InfoMsg{
+			Type: util.InfoTypeError,
+			Msg:  err.Error(),
+		}
+	}
+
+	fileMap := make(map[string]FileHistory)
+
+	for _, file := range files {
+		if existing, ok := fileMap[file.Path]; ok {
+			// Update the latest version
+			existing.latestVersion = file
+			fileMap[file.Path] = existing
+		} else {
+			// Add the initial version
+			fileMap[file.Path] = FileHistory{
+				initialVersion: file,
+				latestVersion:  file,
+			}
+		}
+	}
+
+	sessionFiles := make([]SessionFile, 0, len(fileMap))
+	for path, fh := range fileMap {
+		_, additions, deletions := diff.GenerateDiff(fh.initialVersion.Content, fh.latestVersion.Content, fh.initialVersion.Path)
+		sessionFiles = append(sessionFiles, SessionFile{
+			History:   fh,
+			FilePath:  path,
+			Additions: additions,
+			Deletions: deletions,
+		})
+	}
+
+	return SessionFilesMsg{
+		Files: sessionFiles,
+	}
+}
+
 func (m *sidebarCmp) SetSize(width, height int) tea.Cmd {
 	if width < logoBreakpoint && m.width >= logoBreakpoint {
 		m.logo = m.logoBlock(true)
@@ -112,11 +249,74 @@ func (m *sidebarCmp) logoBlock(compact bool) string {
 	})
 }
 
+func (m *sidebarCmp) filesBlock() string {
+	maxWidth := min(m.width, 58)
+	t := styles.CurrentTheme()
+
+	section := t.S().Subtle.Render(
+		core.Section("Modified Files", maxWidth),
+	)
+
+	files := make([]SessionFile, 0)
+	m.files.Range(func(key, value any) bool {
+		file := value.(SessionFile)
+		files = append(files, file)
+		return true // continue iterating
+	})
+	if len(files) == 0 {
+		return lipgloss.JoinVertical(
+			lipgloss.Left,
+			section,
+			"",
+			t.S().Base.Foreground(t.Border).Render("None"),
+		)
+	}
+
+	fileList := []string{section, ""}
+	// order files by the latest version's created time
+	sort.Slice(files, func(i, j int) bool {
+		return files[i].History.latestVersion.CreatedAt > files[j].History.latestVersion.CreatedAt
+	})
+
+	for _, file := range files {
+		// Extract just the filename from the path
+
+		// Create status indicators for additions/deletions
+		var statusParts []string
+		if file.Additions > 0 {
+			statusParts = append(statusParts, t.S().Base.Foreground(t.Success).Render(fmt.Sprintf("+%d", file.Additions)))
+		}
+		if file.Deletions > 0 {
+			statusParts = append(statusParts, t.S().Base.Foreground(t.Error).Render(fmt.Sprintf("-%d", file.Deletions)))
+		}
+
+		extraContent := strings.Join(statusParts, " ")
+		filePath := fsext.DirTrim(fsext.PrettyPath(file.FilePath), 2)
+		filePath = ansi.Truncate(filePath, maxWidth-lipgloss.Width(extraContent)-2, "…")
+		fileList = append(fileList,
+			core.Status(
+				core.StatusOpts{
+					IconColor:    t.FgMuted,
+					NoIcon:       true,
+					Title:        filePath,
+					ExtraContent: extraContent,
+				},
+				m.width,
+			),
+		)
+	}
+
+	return lipgloss.JoinVertical(
+		lipgloss.Left,
+		fileList...,
+	)
+}
+
 func (m *sidebarCmp) lspBlock() string {
 	maxWidth := min(m.width, 58)
 	t := styles.CurrentTheme()
 
-	section := t.S().Muted.Render(
+	section := t.S().Subtle.Render(
 		core.Section("LSPs", maxWidth),
 	)
 
@@ -137,12 +337,43 @@ func (m *sidebarCmp) lspBlock() string {
 		if l.Disabled {
 			iconColor = t.FgMuted
 		}
+		lspErrs := map[protocol.DiagnosticSeverity]int{
+			protocol.SeverityError:       0,
+			protocol.SeverityWarning:     0,
+			protocol.SeverityHint:        0,
+			protocol.SeverityInformation: 0,
+		}
+		if client, ok := m.lspClients[n]; ok {
+			for _, diagnostics := range client.GetDiagnostics() {
+				for _, diagnostic := range diagnostics {
+					if severity, ok := lspErrs[diagnostic.Severity]; ok {
+						lspErrs[diagnostic.Severity] = severity + 1
+					}
+				}
+			}
+		}
+
+		errs := []string{}
+		if lspErrs[protocol.SeverityError] > 0 {
+			errs = append(errs, t.S().Base.Foreground(t.Error).Render(fmt.Sprintf("%s%d", styles.ErrorIcon, lspErrs[protocol.SeverityError])))
+		}
+		if lspErrs[protocol.SeverityWarning] > 0 {
+			errs = append(errs, t.S().Base.Foreground(t.Warning).Render(fmt.Sprintf("%s%d", styles.WarningIcon, lspErrs[protocol.SeverityWarning])))
+		}
+		if lspErrs[protocol.SeverityHint] > 0 {
+			errs = append(errs, t.S().Base.Foreground(t.FgHalfMuted).Render(fmt.Sprintf("%s%d", styles.HintIcon, lspErrs[protocol.SeverityHint])))
+		}
+		if lspErrs[protocol.SeverityInformation] > 0 {
+			errs = append(errs, t.S().Base.Foreground(t.FgHalfMuted).Render(fmt.Sprintf("%s%d", styles.InfoIcon, lspErrs[protocol.SeverityInformation])))
+		}
+
 		lspList = append(lspList,
 			core.Status(
 				core.StatusOpts{
-					IconColor:   iconColor,
-					Title:       n,
-					Description: l.Command,
+					IconColor:    iconColor,
+					Title:        n,
+					Description:  l.Command,
+					ExtraContent: strings.Join(errs, " "),
 				},
 				m.width,
 			),
@@ -159,7 +390,7 @@ func (m *sidebarCmp) mcpBlock() string {
 	maxWidth := min(m.width, 58)
 	t := styles.CurrentTheme()
 
-	section := t.S().Muted.Render(
+	section := t.S().Subtle.Render(
 		core.Section("MCPs", maxWidth),
 	)
 
@@ -195,6 +426,74 @@ func (m *sidebarCmp) mcpBlock() string {
 	)
 }
 
+func formatTokensAndCost(tokens, contextWindow int64, cost float64) string {
+	t := styles.CurrentTheme()
+	// Format tokens in human-readable format (e.g., 110K, 1.2M)
+	var formattedTokens string
+	switch {
+	case tokens >= 1_000_000:
+		formattedTokens = fmt.Sprintf("%.1fM", float64(tokens)/1_000_000)
+	case tokens >= 1_000:
+		formattedTokens = fmt.Sprintf("%.1fK", float64(tokens)/1_000)
+	default:
+		formattedTokens = fmt.Sprintf("%d", tokens)
+	}
+
+	// Remove .0 suffix if present
+	if strings.HasSuffix(formattedTokens, ".0K") {
+		formattedTokens = strings.Replace(formattedTokens, ".0K", "K", 1)
+	}
+	if strings.HasSuffix(formattedTokens, ".0M") {
+		formattedTokens = strings.Replace(formattedTokens, ".0M", "M", 1)
+	}
+
+	percentage := (float64(tokens) / float64(contextWindow)) * 100
+
+	baseStyle := t.S().Base
+
+	formattedCost := baseStyle.Foreground(t.FgMuted).Render(fmt.Sprintf("$%.2f", cost))
+
+	formattedTokens = baseStyle.Foreground(t.FgSubtle).Render(fmt.Sprintf("(%s)", formattedTokens))
+	formattedPercentage := baseStyle.Foreground(t.FgMuted).Render(fmt.Sprintf("%d%%", int(percentage)))
+	formattedTokens = fmt.Sprintf("%s %s", formattedPercentage, formattedTokens)
+	if percentage > 80 {
+		// add the warning icon
+		formattedTokens = fmt.Sprintf("%s %s", styles.WarningIcon, formattedTokens)
+	}
+
+	return fmt.Sprintf("%s %s", formattedTokens, formattedCost)
+}
+
+func (s *sidebarCmp) currentModelBlock() string {
+	cfg := config.Get()
+	agentCfg := cfg.Agents[config.AgentCoder]
+	selectedModelID := agentCfg.Model
+	model := models.SupportedModels[selectedModelID]
+
+	t := styles.CurrentTheme()
+
+	modelIcon := t.S().Base.Foreground(t.FgSubtle).Render(styles.ModelIcon)
+	modelName := t.S().Text.Render(model.Name)
+	modelInfo := fmt.Sprintf("%s %s", modelIcon, modelName)
+	parts := []string{
+		modelInfo,
+	}
+	if s.session.ID != "" {
+		parts = append(
+			parts,
+			"  "+formatTokensAndCost(
+				s.session.CompletionTokens+s.session.PromptTokens,
+				model.ContextWindow,
+				s.session.Cost,
+			),
+		)
+	}
+	return lipgloss.JoinVertical(
+		lipgloss.Left,
+		parts...,
+	)
+}
+
 func cwd() string {
 	cwd := config.WorkingDirectory()
 	t := styles.CurrentTheme()

internal/tui/components/core/helpers.go 🔗

@@ -4,6 +4,8 @@ import (
 	"image/color"
 	"strings"
 
+	"github.com/alecthomas/chroma/v2"
+	"github.com/charmbracelet/crush/internal/exp/diffview"
 	"github.com/charmbracelet/crush/internal/tui/styles"
 	"github.com/charmbracelet/lipgloss/v2"
 	"github.com/charmbracelet/x/ansi"
@@ -38,10 +40,12 @@ func Title(title string, width int) string {
 type StatusOpts struct {
 	Icon             string
 	IconColor        color.Color
+	NoIcon           bool // If true, no icon will be displayed
 	Title            string
 	TitleColor       color.Color
 	Description      string
 	DescriptionColor color.Color
+	ExtraContent     string // Additional content to append after the description
 }
 
 func Status(ops StatusOpts, width int) string {
@@ -50,6 +54,8 @@ func Status(ops StatusOpts, width int) string {
 	iconColor := t.Success
 	if ops.Icon != "" {
 		icon = ops.Icon
+	} else if ops.NoIcon {
+		icon = ""
 	}
 	if ops.IconColor != nil {
 		iconColor = ops.IconColor
@@ -64,17 +70,26 @@ func Status(ops StatusOpts, width int) string {
 	if ops.DescriptionColor != nil {
 		descriptionColor = ops.DescriptionColor
 	}
-	icon = t.S().Base.Foreground(iconColor).Render(icon)
 	title = t.S().Base.Foreground(titleColor).Render(title)
 	if description != "" {
-		description = ansi.Truncate(description, width-lipgloss.Width(icon)-lipgloss.Width(title)-2, "…")
+		extraContent := len(ops.ExtraContent)
+		if extraContent > 0 {
+			extraContent += 1
+		}
+		description = ansi.Truncate(description, width-lipgloss.Width(icon)-lipgloss.Width(title)-2-extraContent, "…")
 	}
 	description = t.S().Base.Foreground(descriptionColor).Render(description)
-	return strings.Join([]string{
-		icon,
-		title,
-		description,
-	}, " ")
+
+	content := []string{}
+	if icon != "" {
+		content = append(content, t.S().Base.Foreground(iconColor).Render(icon))
+	}
+	content = append(content, title, description)
+	if ops.ExtraContent != "" {
+		content = append(content, ops.ExtraContent)
+	}
+
+	return strings.Join(content, " ")
 }
 
 type ButtonOpts struct {
@@ -131,3 +146,12 @@ func SelectableButtons(buttons []ButtonOpts, spacing string) string {
 
 	return lipgloss.JoinHorizontal(lipgloss.Left, parts...)
 }
+
+func DiffFormatter() *diffview.DiffView {
+	formatDiff := diffview.New()
+	style := chroma.MustNewStyle("crush", styles.GetChromaTheme())
+	diff := formatDiff.
+		SyntaxHightlight(true).
+		ChromaStyle(style)
+	return diff
+}

internal/tui/components/dialogs/commands/commands.go 🔗

@@ -239,7 +239,8 @@ func (c *commandDialogCmp) defaultCommands() []Command {
 
 	The file you create will be given to agentic coding agents (such as yourself) that operate in this repository. Make it about 20 lines long.
 	If there's already a CRUSH.md, improve it.
-	If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.`
+	If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.
+	Add the .crush directory to the .gitignore file if it's not already there.`
 				return util.CmdHandler(chat.SendMsg{
 					Text: prompt,
 				})

internal/tui/components/dialogs/init/init.go 🔗

@@ -180,7 +180,8 @@ func (m *initDialogCmp) handleInitialization(initialize bool) tea.Cmd {
 
 The file you create will be given to agentic coding agents (such as yourself) that operate in this repository. Make it about 20 lines long.
 If there's already a CRUSH.md, improve it.
-If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.`
+If there are Cursor rules (in .cursor/rules/ or .cursorrules) or Copilot rules (in .github/copilot-instructions.md), make sure to include them.
+Add the .crush directory to the .gitignore file if it's not already there.`
 
 		// Mark the project as initialized
 		if err := config.MarkProjectInitialized(); err != nil {

internal/tui/components/dialogs/permissions/permissions.go 🔗

@@ -8,7 +8,7 @@ import (
 	"github.com/charmbracelet/bubbles/v2/viewport"
 	tea "github.com/charmbracelet/bubbletea/v2"
 	"github.com/charmbracelet/crush/internal/diff"
-	"github.com/charmbracelet/crush/internal/fileutil"
+	"github.com/charmbracelet/crush/internal/fsext"
 	"github.com/charmbracelet/crush/internal/llm/tools"
 	"github.com/charmbracelet/crush/internal/permission"
 	"github.com/charmbracelet/crush/internal/tui/components/core"
@@ -170,7 +170,7 @@ func (p *permissionDialogCmp) renderHeader() string {
 	pathKey := t.S().Muted.Render("Path")
 	pathValue := t.S().Text.
 		Width(p.width - lipgloss.Width(pathKey)).
-		Render(fmt.Sprintf(" %s", fileutil.PrettyPath(p.permission.Path)))
+		Render(fmt.Sprintf(" %s", fsext.PrettyPath(p.permission.Path)))
 
 	headerParts := []string{
 		lipgloss.JoinHorizontal(
@@ -196,7 +196,7 @@ func (p *permissionDialogCmp) renderHeader() string {
 		fileKey := t.S().Muted.Render("File")
 		filePath := t.S().Text.
 			Width(p.width - lipgloss.Width(fileKey)).
-			Render(fmt.Sprintf(" %s", fileutil.PrettyPath(params.FilePath)))
+			Render(fmt.Sprintf(" %s", fsext.PrettyPath(params.FilePath)))
 		headerParts = append(headerParts,
 			lipgloss.JoinHorizontal(
 				lipgloss.Left,
@@ -211,7 +211,7 @@ func (p *permissionDialogCmp) renderHeader() string {
 		fileKey := t.S().Muted.Render("File")
 		filePath := t.S().Text.
 			Width(p.width - lipgloss.Width(fileKey)).
-			Render(fmt.Sprintf(" %s", fileutil.PrettyPath(params.FilePath)))
+			Render(fmt.Sprintf(" %s", fsext.PrettyPath(params.FilePath)))
 		headerParts = append(headerParts,
 			lipgloss.JoinHorizontal(
 				lipgloss.Left,
@@ -267,24 +267,13 @@ func (p *permissionDialogCmp) renderBashContent() string {
 
 func (p *permissionDialogCmp) renderEditContent() string {
 	if pr, ok := p.permission.Params.(tools.EditPermissionsParams); ok {
-		diff := p.GetOrSetDiff(p.permission.ID, func() (string, error) {
-			return diff.FormatDiff(pr.Diff, diff.WithTotalWidth(p.contentViewPort.Width()))
-		})
-
-		contentHeight := min(p.height-9, lipgloss.Height(diff))
-		p.contentViewPort.SetHeight(contentHeight)
-		p.contentViewPort.SetContent(diff)
-		return p.styleViewport()
-	}
-	return ""
-}
-
-func (p *permissionDialogCmp) renderPatchContent() string {
-	if pr, ok := p.permission.Params.(tools.EditPermissionsParams); ok {
-		diff := p.GetOrSetDiff(p.permission.ID, func() (string, error) {
-			return diff.FormatDiff(pr.Diff, diff.WithTotalWidth(p.contentViewPort.Width()))
-		})
+		formatter := core.DiffFormatter().
+			Before(fsext.PrettyPath(pr.FilePath), pr.OldContent).
+			After(fsext.PrettyPath(pr.FilePath), pr.NewContent).
+			Width(p.contentViewPort.Width()).
+			Split()
 
+		diff := formatter.String()
 		contentHeight := min(p.height-9, lipgloss.Height(diff))
 		p.contentViewPort.SetHeight(contentHeight)
 		p.contentViewPort.SetContent(diff)
@@ -381,8 +370,6 @@ func (p *permissionDialogCmp) render() string {
 		contentFinal = p.renderBashContent()
 	case tools.EditToolName:
 		contentFinal = p.renderEditContent()
-	case tools.PatchToolName:
-		contentFinal = p.renderPatchContent()
 	case tools.WriteToolName:
 		contentFinal = p.renderWriteContent()
 	case tools.FetchToolName:

internal/tui/page/chat/chat.go 🔗

@@ -209,7 +209,7 @@ func (p *chatPage) Bindings() []key.Binding {
 
 func NewChatPage(app *app.App) ChatPage {
 	sidebarContainer := layout.NewContainer(
-		sidebar.NewSidebarCmp(),
+		sidebar.NewSidebarCmp(app.History, app.LSPClients),
 		layout.WithPadding(1, 1, 1, 1),
 	)
 	editorContainer := layout.NewContainer(

internal/tui/styles/crush.go 🔗

@@ -32,7 +32,7 @@ func NewCrushTheme() *Theme {
 		// Status
 		Success: charmtone.Guac,
 		Error:   charmtone.Sriracha,
-		Warning: charmtone.Uni,
+		Warning: charmtone.Zest,
 		Info:    charmtone.Malibu,
 
 		// Colors

internal/tui/styles/icons.go 🔗

@@ -4,11 +4,12 @@ const (
 	CheckIcon    string = "✓"
 	ErrorIcon    string = "×"
 	WarningIcon  string = "⚠"
-	InfoIcon     string = ""
-	HintIcon     string = "i"
+	InfoIcon     string = "ⓘ"
+	HintIcon     string = "∵"
 	SpinnerIcon  string = "..."
 	LoadingIcon  string = "⟳"
 	DocumentIcon string = "🖼"
+	ModelIcon    string = "⬡"
 
 	// Tool call icons
 	ToolPending string = "●"

internal/version/version.go 🔗

@@ -5,7 +5,7 @@ import "runtime/debug"
 // Build-time parameters set via -ldflags
 var Version = "unknown"
 
-// A user may install pug using `go install github.com/charmbracelet/crush@latest`.
+// A user may install crush using `go install github.com/charmbracelet/crush@latest`.
 // without -ldflags, in which case the version above is unset. As a workaround
 // we use the embedded build version that *is* set when using `go install` (and
 // is only set for `go install` and not for `go build`).

todos.md 🔗

@@ -3,8 +3,11 @@
 - [x] Implement help
   - [x] Show full help
   - [x] Make help dependent on the focused pane and page
-- [ ] Implement current model in the sidebar
-- [ ] Implement changed files
+- [x] Implement current model in the sidebar
+- [x] Implement LSP errors
+- [x] Implement changed files
+  - [x] Implement initial load
+  - [x] Implement realtime file changes
 - [ ] Events when tool error
 - [ ] Support bash commands
 - [ ] Editor attachments fixes
@@ -23,8 +26,10 @@
   - [ ] Address UX issues
   - [ ] Fix issue with numbers (padding) view tool
 - [ ] Implement responsive mode
+- [ ] Update interactive mode to use the spinner
 - [ ] Revisit the core list component
   - [ ] This component has become super complex we might need to fix this.
+- [ ] Handle correct LSP and MCP status icon
 - [x] Investigate ways to make the spinner less CPU intensive
 - [ ] General cleanup and documentation
 - [ ] Update the readme
@@ -34,3 +39,4 @@
 - [ ] Revisit the provider/model/configs
 - [ ] Implement correct persistent shell
 - [ ] Store file read/write time somewhere so that the we can make sure that even if we restart we do not need to re-read the same file
+- [ ] Send updates to the UI when new LSP diagnostics are available