aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/ext/menu.lua16
-rw-r--r--core/locale.lua10
2 files changed, 26 insertions, 0 deletions
diff --git a/core/ext/menu.lua b/core/ext/menu.lua
index db089ed0..44a70e2d 100644
--- a/core/ext/menu.lua
+++ b/core/ext/menu.lua
@@ -88,6 +88,10 @@ local ID = {
REMOVE_MULTIPLE_LINES = 410,
UPDATE_MULTIPLE_LINES = 411,
FINISH_MULTIPLE_LINES = 412,
+ TOGGLE_BOOKMARK = 416,
+ CLEAR_BOOKMARKS = 417,
+ GOTO_NEXT_BOOKMARK = 418,
+ GOTO_PREV_BOOKMARK = 419,
START_RECORDING_MACRO = 413,
STOP_RECORDING_MACRO = 414,
PLAY_MACRO = 415,
@@ -289,6 +293,12 @@ t.menubar = {
{ l.MENU_TOOLS_ML_UPDATE, ID.UPDATE_MULTIPLE_LINES },
{ l.MENU_TOOLS_ML_FINISH, ID.FINISH_MULTIPLE_LINES },
},
+ { title = l.MENU_TOOLS_BM_TITLE,
+ { l.MENU_TOOLS_BM_TOGGLE, ID.TOGGLE_BOOKMARK },
+ { l.MENU_TOOLS_BM_CLEAR_ALL, ID.CLEAR_BOOKMARKS },
+ { l.MENU_TOOLS_BM_NEXT, ID.GOTO_NEXT_BOOKMARK },
+ { l.MENU_TOOLS_BM_PREV, ID.GOTO_PREV_BOOKMARK },
+ },
{ title = l.MENU_TOOLS_MACROS_TITLE,
{ l.MENU_TOOLS_MACROS_START, ID.START_RECORDING_MACRO },
{ l.MENU_TOOLS_MACROS_STOP, ID.STOP_RECORDING_MACRO },
@@ -402,6 +412,7 @@ local b, v = 'buffer', 'view'
local m_snippets = _m.textadept.lsnippets
local m_editing = _m.textadept.editing
local m_mlines = _m.textadept.mlines
+local m_bookmarks = _m.textadept.bookmarks
local m_macros = _m.textadept.macros
local function pm_activate(text) t.pm.entry_text = text t.pm.activate() end
@@ -505,6 +516,11 @@ local actions = {
[ID.REMOVE_MULTIPLE_LINES] = { m_mlines.remove_multiple },
[ID.UPDATE_MULTIPLE_LINES] = { m_mlines.update },
[ID.FINISH_MULTIPLE_LINES] = { m_mlines.clear },
+ -- Tools -> Bookmark
+ [ID.TOGGLE_BOOKMARK] = { m_bookmarks.toggle },
+ [ID.CLEAR_BOOKMARKS] = { m_bookmarks.clear },
+ [ID.GOTO_NEXT_BOOKMARK] = { m_bookmarks.goto_next },
+ [ID.GOTO_PREV_BOOKMARK] = { m_bookmarks.goto_prev },
-- Tools -> Macros
[ID.START_RECORDING_MACRO] = { m_macros.start_recording },
[ID.STOP_RECORDING_MACRO] = { m_macros.stop_recording },
diff --git a/core/locale.lua b/core/locale.lua
index 00d10b50..930f1151 100644
--- a/core/locale.lua
+++ b/core/locale.lua
@@ -270,6 +270,16 @@ MENU_TOOLS_ML_REMOVE_MULTIPLE = 'R_emove Multiple Lines'
MENU_TOOLS_ML_UPDATE = '_Update Multiple Lines'
-- _Finish Editing
MENU_TOOLS_ML_FINISH = '_Finish Editing'
+-- _Bookmark
+MENU_TOOLS_BM_TITLE = '_Bookmark'
+-- _Toggle on Current Line
+MENU_TOOLS_BM_TOGGLE = '_Toggle on Current Line'
+-- _Clear All
+MENU_TOOLS_BM_CLEAR_ALL = '_Clear All'
+-- _Next
+MENU_TOOLS_BM_NEXT = '_Next'
+-- _Previous
+MENU_TOOLS_BM_PREV = '_Previous'
-- M_acros
MENU_TOOLS_MACROS_TITLE = 'M_acros'
-- _Start Recording