code: private void displaySelectedCommand(final String selectedCommand) throws IOException {
  
  		lineBuffer.setLength(0);
  		lineBuffer.append(selectedCommand);
  		lineLength = lineBuffer.length();
  
  		int loopCount = cursorPosition;
  		for (int i=0; i<loopCount; i++) {
  			handleCursorLeft();
  		}
  
  		writer.write(27);
  		writer.write('[');
  		writer.write('K');
  
  		print(selectedCommand);
  
  		cursorPosition = lineLength;
  	}
docs: ----- private methods -----