File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -9,8 +9,8 @@ export interface CommitDetailType extends QuickPickItem {
99 isEdit ?: boolean ;
1010}
1111//最大的 subject 限制字数 Max subject words
12- export const MaxSubjectWords =
13- workspace . getConfiguration ( 'GitCommitPlugin' ) . get < boolean > ( 'MaxSubjectWords ' ) || 20 ;
12+ export const MaxSubjectCharacters =
13+ workspace . getConfiguration ( 'GitCommitPlugin' ) . get < boolean > ( 'MaxSubjectCharacters ' ) || 20 ;
1414
1515export function GetCommitDetailType ( ) {
1616 const CommitDetailType : Array < CommitDetailType > = [
@@ -27,7 +27,7 @@ export function GetCommitDetailType() {
2727 description : localize ( 'extension.commitDetailType.subject.description' ) ,
2828 detail : localize (
2929 'extension.commitDetailType.subject.detail' ,
30- MaxSubjectWords . toString ( ) ,
30+ MaxSubjectCharacters . toString ( ) ,
3131 ) ,
3232 isEdit : false ,
3333 } ,
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import GetCommitTypes, { CommitType } from './config/commit-type';
66import {
77 GetCommitDetailType ,
88 CommitDetailQuickPickOptions ,
9- MaxSubjectWords ,
9+ MaxSubjectCharacters ,
1010 CommitDetailType ,
1111} from './config/commit-detail' ;
1212import GetCommitInputType , { CommitInputType } from './config/commit-input' ;
@@ -114,9 +114,9 @@ export function activate(context: vscode.ExtensionContext) {
114114 _detailType && ( _detailType . isEdit = true ) ;
115115 if ( _key === 'subject' ) {
116116 const input_value_length = value ? value ?. length : 0 ;
117- if ( input_value_length > MaxSubjectWords ) {
117+ if ( input_value_length > MaxSubjectCharacters ) {
118118 vscode . window . showErrorMessage (
119- `The commit overview is no more than ${ MaxSubjectWords } words but the current input is ${ input_value_length } words ` ,
119+ `The commit overview is no more than ${ MaxSubjectCharacters } characters but the current input is ${ input_value_length } characters ` ,
120120 ...[ 'ok' ] ,
121121 ) ;
122122 inputMessageDetail ( _key ) ;
You can’t perform that action at this time.
0 commit comments