-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add plugin from wmjordan to work around issue #24
closes #24
- Loading branch information
1 parent
dc7bac3
commit 102b0d9
Showing
5 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// returns the version of the plugin | ||
// this callback is not optional! If you fail to implement this, the plugin | ||
// config dialog won't work properly with your plugin | ||
function Version() { return 100; } | ||
|
||
|
||
// this is the main function that gets executed when the command is run, i.e. | ||
// the button is clicked | ||
function Execute() | ||
{ | ||
var t = BowPad.SciGetSelText(); | ||
if (t.length == 0) { | ||
t = BowPad.SciGetCurLine(); | ||
} | ||
BowPad.SetClipboardData(t, ""); | ||
var retry = 1000; | ||
while ((t = BowPad.GetClipboardText()).length == 0 && --retry > 0) { | ||
/*BowPad.sleep(10);*/ | ||
BowPad.SetClipboardData(t, ""); | ||
} | ||
if (t.length == 0 && BowPad.GetClipboardText().length == 0) { | ||
BowPad.alert("Copy failed"); | ||
return false; | ||
} | ||
return true; | ||
} | ||
|
||
// return true if the plugin command is enabled (used for the button) | ||
// note: not used yet by BowPad, but planned for the future | ||
function IsEnabled() { return true; } | ||
|
||
// return true if the plugin button should appear as checked | ||
// note: not used yet by BowPad, but planned for the future | ||
function IsChecked() { return false; } | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
100 | ||
208 | ||
Compatible copy\nUse this script to copy text when you have trouble copying content from BowPad while another program keeps accessing clipboard | ||
wmjordan |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters