Rewrite, cleanup and bugfixes
* More events added, constants cleaned up * Events now handled using noccylabs/tinyevent * Fixed magenta/cyan mixup in style * Fixed LineRead not resetting history pointer on command
This commit is contained in:
		@@ -2,6 +2,10 @@
 | 
			
		||||
 | 
			
		||||
namespace NoccyLabs\Shell;
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * This is a readline-like implementation in pure PHP.
 | 
			
		||||
 *
 | 
			
		||||
 */
 | 
			
		||||
class LineRead
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
@@ -127,6 +131,7 @@ class LineRead
 | 
			
		||||
                    array_unshift($this->history, $this->buffer);
 | 
			
		||||
                    $this->buffer = null;
 | 
			
		||||
                    $this->posCursor = 0;
 | 
			
		||||
                    $this->posHistory = 0;
 | 
			
		||||
                    printf("\n\r");
 | 
			
		||||
                    $this->state = self::STATE_IDLE;
 | 
			
		||||
                }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user