mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-08-07 22:02:56 +03:00
Convert tabs to spaces in WrapViewLinesToWidth
We haven't needed this before since we were only using the function for text in confirmations and menus, which is unlikely to contain tabs. We are going to use it for patches in the staging view though, which often do.
This commit is contained in:
@@ -334,6 +334,15 @@ func TestWrapViewLinesToWidth(t *testing.T) {
|
||||
"drifting blah blah",
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "Tabs",
|
||||
wrap: true,
|
||||
text: "\ta\tbb\tccc\tdddd\teeeee",
|
||||
width: 50,
|
||||
expectedWrappedLines: []string{
|
||||
" a bb ccc dddd eeeee",
|
||||
},
|
||||
},
|
||||
}
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user