File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,8 +35,8 @@ export const prepareMenu = (rules) => {
3535export const createMenu = ( { title, items, currentIndex, footerLines = [ ] } ) => {
3636 process . stdout . write ( '\x1B[2J\x1B[0f' ) ;
3737 if ( title ) {
38- console . info ( styleText ( 'bold' , title ) ) ;
39- console . info ( styleText ( 'bold' , '=' . repeat ( title . length ) + '\n' ) ) ;
38+ console . info ( styleText ( "white" , title ) ) ;
39+ console . info ( styleText ( "white" , '=' . repeat ( title . length ) + '\n' ) ) ;
4040 }
4141 items . forEach ( ( item , idx ) => {
4242 const isCurrent = idx === currentIndex ;
@@ -99,7 +99,6 @@ export const interactiveCategorySelection = async (rules) => {
9999 return null ;
100100 }
101101 let currentIndex = 0 ;
102-
103102 return new Promise ( ( resolve ) => {
104103
105104 /**
@@ -113,6 +112,7 @@ export const interactiveCategorySelection = async (rules) => {
113112 unmountInput ( handleKeyPress ) ;
114113 process . stdin . removeListener ( 'data' , handleKeyPress ) ;
115114 console . log ( '\n❌ Category selection cancelled' ) ;
115+ currentIndex = currentIndex ;
116116 resolve ( null ) ;
117117 break ;
118118 case '\r' : // Enter
You can’t perform that action at this time.
0 commit comments