PageRenderTime 45ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/jEdit/tags/jedit-4-3-pre5/macros/Files/Copy_Path_to_Clipboard.bsh

#
Unknown | 27 lines | 22 code | 5 blank | 0 comment | 0 complexity | 49065d0c906b4b3f0780504f592537db MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. /*
  2. * Copy_Path_to_Clipboad.bsh - Copies the current buffer's
  3. * path to the clipboard.
  4. *
  5. * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver@rutherfurd.net>
  6. *
  7. * $Id: Copy_Path_to_Clipboard.bsh 5016 2004-04-09 17:10:15Z spestov $
  8. */
  9. void copyBufferPathToClipboard(Buffer buffer)
  10. {
  11. Registers.setRegister('$',buffer.getPath());
  12. HistoryModel.getModel("clipboard").addItem(buffer.getPath());
  13. }
  14. copyBufferPathToClipboard(buffer);
  15. /*
  16. <listitem>
  17. <para><filename>Copy_Path_to_Clipboad.bsh</filename></para>
  18. <abstract><para>Copies the current buffer's path
  19. to the clipboard.
  20. </para></abstract>
  21. </listitem>
  22. */