@@ -1032,7 +1032,9 @@ func TestView(t *testing.T) {
10321032 {
10331033 name : "set width with style" ,
10341034 modelFunc : func (m Model ) Model {
1035- m .Styles .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1035+ s := m .Styles ()
1036+ s .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1037+ m .SetStyles (s )
10361038 m .Focus ()
10371039
10381040 m .SetWidth (12 )
@@ -1060,7 +1062,9 @@ func TestView(t *testing.T) {
10601062 {
10611063 name : "set width with style max width minus one" ,
10621064 modelFunc : func (m Model ) Model {
1063- m .Styles .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1065+ s := m .Styles ()
1066+ s .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1067+ m .SetStyles (s )
10641068 m .Focus ()
10651069
10661070 m .SetWidth (12 )
@@ -1088,7 +1092,9 @@ func TestView(t *testing.T) {
10881092 {
10891093 name : "set width with style max width" ,
10901094 modelFunc : func (m Model ) Model {
1091- m .Styles .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1095+ s := m .Styles ()
1096+ s .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1097+ m .SetStyles (s )
10921098 m .Focus ()
10931099
10941100 m .SetWidth (12 )
@@ -1116,7 +1122,9 @@ func TestView(t *testing.T) {
11161122 {
11171123 name : "set width with style max width plus one" ,
11181124 modelFunc : func (m Model ) Model {
1119- m .Styles .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1125+ s := m .Styles ()
1126+ s .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1127+ m .SetStyles (s )
11201128 m .Focus ()
11211129
11221130 m .SetWidth (12 )
@@ -1144,7 +1152,9 @@ func TestView(t *testing.T) {
11441152 {
11451153 name : "set width without line numbers with style" ,
11461154 modelFunc : func (m Model ) Model {
1147- m .Styles .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1155+ s := m .Styles ()
1156+ s .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1157+ m .SetStyles (s )
11481158 m .Focus ()
11491159
11501160 m .ShowLineNumbers = false
@@ -1173,7 +1183,9 @@ func TestView(t *testing.T) {
11731183 {
11741184 name : "set width without line numbers with style max width minus one" ,
11751185 modelFunc : func (m Model ) Model {
1176- m .Styles .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1186+ s := m .Styles ()
1187+ s .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1188+ m .SetStyles (s )
11771189 m .Focus ()
11781190
11791191 m .ShowLineNumbers = false
@@ -1202,7 +1214,9 @@ func TestView(t *testing.T) {
12021214 {
12031215 name : "set width without line numbers with style max width" ,
12041216 modelFunc : func (m Model ) Model {
1205- m .Styles .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1217+ s := m .Styles ()
1218+ s .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1219+ m .SetStyles (s )
12061220 m .Focus ()
12071221
12081222 m .ShowLineNumbers = false
@@ -1231,7 +1245,9 @@ func TestView(t *testing.T) {
12311245 {
12321246 name : "set width without line numbers with style max width plus one" ,
12331247 modelFunc : func (m Model ) Model {
1234- m .Styles .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1248+ s := m .Styles ()
1249+ s .Focused .Base = lipgloss .NewStyle ().Border (lipgloss .NormalBorder ())
1250+ m .SetStyles (s )
12351251 m .Focus ()
12361252
12371253 m .ShowLineNumbers = false
0 commit comments