if(textArea.isEditable()) { StringBuffer buf = new StringBuffer(); for(int i = 0; i < repeatCount; i++) buf.append(str); textArea.overwriteSetSelectedText(buf.toString()); return; }
StringBuffer buf = new StringBuffer(); for(int i = 0; i < repeatCount; i++) buf.append(str); textArea.overwriteSetSelectedText(buf.toString());
	public void actionPerformed(ActionEvent evt)	{		View view = getView(evt);		Buffer buffer = view.getBuffer();		JEditTextArea textArea = view.getTextArea();		String str = evt.getActionCommand();		if(str == null)		{			view.pushStatus(jEdit.getProperty("view.status.insert-literal"));			textArea.getInputHandler().grabNextKeyStroke(this);			return;		}		else		{			view.popStatus();			if(!str.equals("\0"))			{				int repeatCount = textArea.getInputHandler().getRepeatCount();				if(textArea.isEditable())				{					StringBuffer buf = new StringBuffer();					for(int i = 0; i < repeatCount; i++)						buf.append(str);					textArea.overwriteSetSelectedText(buf.toString());					return;				}			}		}		view.getToolkit().beep();	}