new DuplicateLineOrSelection
Brought to you by:
set
From: Thiago F.G. A. <tf...@te...> - 2005-11-01 15:52:27
|
Hi, I wrote a new version of the macro 'DuplicateLineOrSelection'. DuplicateLineOrSelection used the clipboard when you duplicated a line. So, whatever you had in the clipboard before invoking the macro was lost and replaced with the contents of the current line. The new version uses a temporary variable instead. [], Thiago ------------------------------------------- (defmacro 'DuplicateLineOrSelection' (if (SelectionExists) (InsertText (GetSelection)) (progn ; else (SendCommands cmcPushCursorPos cmcLineStart cmcSelectOn cmcLineEnd cmcSelectOff) (= "temp" (GetSelection)) (SendCommands cmcLineEnd) (InsertText (+ "\n" temp)) (SendCommands cmcPopCursorPos cmcLineDown) ) ) ) -- Thiago F. G. Albuquerque () ascii ribbon campaign - against html mail /\ - against microsoft attachments |