File: Copy_Name_to_Clipboard.bsh

package info (click to toggle)
jedit 5.3.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 14,252 kB
  • ctags: 11,190
  • sloc: java: 98,480; xml: 94,070; makefile: 52; sh: 42; cpp: 6; python: 6
file content (28 lines) | stat: -rw-r--r-- 625 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * Copy_Name_to_Clipboad.bsh - Copies the current buffer's filename
 * to the clipboard.
 *
 * Copyright (C) 2002-2004 Ollie Rutherfurd <oliver@rutherfurd.net>
 *
 * $Id: Copy_Name_to_Clipboard.bsh 5016 2004-04-09 17:10:15Z spestov $
 */

void copyBufferNameToClipboard(Buffer buffer)
{
	Registers.setRegister('$',buffer.getName());
	HistoryModel.getModel("clipboard").addItem(buffer.getName());
}

copyBufferNameToClipboard(buffer);

/*

<listitem>
	<para><filename>Copy_Name_to_Clipboad.bsh</filename></para>
	<abstract><para>Copies the current buffer's filename
		to the clipboard.
	</para></abstract>
</listitem>

*/