bugfix for non-TTY case
This commit is contained in:
		
							parent
							
								
									6763d727f5
								
							
						
					
					
						commit
						91efb1bbf2
					
				
							
								
								
									
										5
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								index.js
									
									
									
									
									
								
							| @ -37,6 +37,7 @@ var form = { | ||||
|     , _prompt: '' | ||||
|     , _input: [] | ||||
|     , _inputIndex: 0 | ||||
|     , isTTY: rws.isTTY | ||||
|     , cursorTo: function (x, y) { | ||||
|         if ('number' !== typeof x || (0 !== x && !x)) { | ||||
|           throw new Error('cursorTo(x[, y]): x is not optional and must be a number'); | ||||
| @ -245,8 +246,6 @@ var form = { | ||||
|         var x; | ||||
| 
 | ||||
|         if (CTRL_C === ch) { | ||||
|           console.log(""); | ||||
|           console.log("received CTRL+C and quit"); | ||||
|           process.exit(0); | ||||
|           callback(new Error("cancelled")); | ||||
|         } | ||||
| @ -313,7 +312,7 @@ var form = { | ||||
| 
 | ||||
|       if (cbs.value) { | ||||
|         ws._input = require('spliddit')(cbs.value); | ||||
|         ws._inputIndex = ws.input.length; | ||||
|         ws._inputIndex = ws._input.length; | ||||
|         callback(); | ||||
|         return; | ||||
|       } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user