/* * Copy_Selection_or_Line.bsh - a BeanShell macro for jEdit * which copies either the selected text, or the current line * if no text is selected, to the clipboard. * * Copyright (C) 2003 Ollie Rutherfurd * * $Id: Copy_Selection_or_Line.bsh 58 2003-11-03 21:49:26Z oliver $ */ copySelectionOrLine(){ selections = textArea.getSelection(); if(selections.length == 0){ textArea.smartHome(false); textArea.smartEnd(true); } Registers.copy(textArea,'$'); } copySelectionOrLine(); /* Macro index data (in DocBook format) Copy_Selection_or_Line.bsh If no text is selected, the current line is cppied to the clipboard, otherwise the selected text is copied to the clipboard. */