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