Skip to content

Commit

Permalink
add plugin from wmjordan@163.com to hide the bookmark margin
Browse files Browse the repository at this point in the history
closes #329
  • Loading branch information
stefankueng committed May 18, 2023
1 parent 67c3a21 commit c7dd566
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
Binary file added plugins/HideBookmarkMargin.zip
Binary file not shown.
35 changes: 35 additions & 0 deletions plugins/HideBookmarkMargin/HideBookmarkMargin.bpj
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// 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()
{
// execute whatever the plugin should do here,
// return true if the command was successful or false if it didn't run
// successfully
if (BowPad.SciGetMarginWidthN(2) == 1) {
BowPad.SciSetMarginWidthN(2, 16);
}
else {
BowPad.SciSetMarginWidthN(2, 1);
}
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; }

// called after a document was opened
function AfterInit() {
BowPad.SciSetMarginWidthN(2, 1);
return;
}

4 changes: 4 additions & 0 deletions plugins/HideBookmarkMargin/HideBookmarkMargin.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
100
200
Hides Bookmark Margin by default, click to toggle
wmjordan@163.com
4 changes: 4 additions & 0 deletions plugins/plugins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ EditorSettings
110
208
Overrides editor settings for universal and specific file types.\nModify EditorSettings.bpj file for customization.\nwmjordan@163.com\n
HideBookmarkMargin
100
200
Hides Bookmark Margin by default, click to toggle\nwmjordan@163.com\n
SearchSelection
104
200
Expand Down

0 comments on commit c7dd566

Please sign in to comment.