@@ -2263,7 +2263,8 @@ class SCMInputWidget {
2263
2263
}
2264
2264
2265
2265
getContentHeight ( ) : number {
2266
- const editorContentHeight = this . inputEditor . getContentHeight ( ) ;
2266
+ const inputEditorMinHeight = this . getInputEditorMinHeight ( ) ;
2267
+ const editorContentHeight = Math . max ( this . inputEditor . getContentHeight ( ) , inputEditorMinHeight ) ;
2267
2268
const editorContextHeightMax = this . getInputEditorMaxHeight ( ) ;
2268
2269
2269
2270
return Math . min ( editorContentHeight , editorContextHeightMax ) ;
@@ -2408,6 +2409,11 @@ class SCMInputWidget {
2408
2409
return typeof inputMaxLines === 'number' ? clamp ( inputMaxLines , 1 , 50 ) : 10 ;
2409
2410
}
2410
2411
2412
+ private getInputEditorMinLines ( ) : number {
2413
+ const inputMinLines = this . configurationService . getValue ( 'scm.inputMinLines' ) ;
2414
+ return typeof inputMinLines === 'number' ? clamp ( inputMinLines , 1 , 50 ) : 1 ;
2415
+ }
2416
+
2411
2417
private getInputEditorMaxHeight ( ) : number {
2412
2418
const maxLines = this . getInputEditorMaxLines ( ) ;
2413
2419
const fontSize = this . getInputEditorFontSize ( ) ;
@@ -2417,6 +2423,15 @@ class SCMInputWidget {
2417
2423
return maxLines * lineHeight + top + bottom ;
2418
2424
}
2419
2425
2426
+ private getInputEditorMinHeight ( ) : number {
2427
+ const minLines = this . getInputEditorMinLines ( ) ;
2428
+ const fontSize = this . getInputEditorFontSize ( ) ;
2429
+ const lineHeight = this . computeLineHeight ( fontSize ) ;
2430
+ const { top, bottom } = this . inputEditor . getOption ( EditorOption . padding ) ;
2431
+
2432
+ return minLines * lineHeight + top + bottom ;
2433
+ }
2434
+
2420
2435
private getToolbarWidth ( ) : number {
2421
2436
const showInputActionButton = this . configurationService . getValue < boolean > ( 'scm.showInputActionButton' ) ;
2422
2437
if ( ! this . toolbar || ! showInputActionButton || this . toolbar ?. isEmpty ( ) === true ) {
0 commit comments