mirror of
				https://github.com/jesseduffield/lazygit.git
				synced 2025-10-30 23:57:43 +02:00 
			
		
		
		
	Add tests for scroll-off margin of zero
This commit is contained in:
		| @@ -52,6 +52,15 @@ func Test_calculateLinesToScrollUp(t *testing.T) { | ||||
| 			lineIdxAfter:          12, | ||||
| 			expectedLinesToScroll: 1, | ||||
| 		}, | ||||
| 		{ | ||||
| 			name:                  "scroll-off margin is zero - scroll by 1 at end of view", | ||||
| 			viewPortStart:         10, | ||||
| 			viewPortHeight:        10, | ||||
| 			scrollOffMargin:       0, | ||||
| 			lineIdxBefore:         10, | ||||
| 			lineIdxAfter:          9, | ||||
| 			expectedLinesToScroll: 1, | ||||
| 		}, | ||||
| 		{ | ||||
| 			name:                  "before inside scroll-off margin - scroll by more than 1", | ||||
| 			viewPortStart:         10, | ||||
| @@ -134,6 +143,15 @@ func Test_calculateLinesToScrollDown(t *testing.T) { | ||||
| 			lineIdxAfter:          17, | ||||
| 			expectedLinesToScroll: 1, | ||||
| 		}, | ||||
| 		{ | ||||
| 			name:                  "scroll-off margin is zero - scroll by 1 at end of view", | ||||
| 			viewPortStart:         10, | ||||
| 			viewPortHeight:        10, | ||||
| 			scrollOffMargin:       0, | ||||
| 			lineIdxBefore:         19, | ||||
| 			lineIdxAfter:          20, | ||||
| 			expectedLinesToScroll: 1, | ||||
| 		}, | ||||
| 		{ | ||||
| 			name:                  "before inside scroll-off margin - scroll by more than 1", | ||||
| 			viewPortStart:         10, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user