The ability to duplicate a buffer as a new buffer would be nice. Here's a simple solution:
file = buffer.getPath();
Buffer buffer = jEdit.openFile(view,null,buffer.getDirectory()+"Copy of " + buffer.getName(),true,null);
buffer.insertFile(view, file);
textArea.goToBufferStart(false);
Logged In: YES
user_id=17432
Originator: NO
Why not just create a macro for this? Use the macro recorder to record the following steps:
- select all in current buffer
- copy
- create new buffer
- paste
You can have the macro in the menus or map it to a keystroke.
Logged In: YES
user_id=285591
Originator: NO
I added a Duplicate_Buffer.bsh macro in the trunk.
You can get it now here if you want it
http://jedit.svn.sourceforge.net/viewvc/jedit/jEdit/trunk/macros/Files/Duplicate_Buffer.bsh?view=log