aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/bookmarks.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-09-29 21:09:56 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-09-29 21:09:56 -0400
commit18d7be2d1eaaef73c56dc850a3172529726d7a34 (patch)
tree3eeffd78480b6ade940532e8dc3f143304b48cb6 /modules/textadept/bookmarks.lua
parentef23e13ac57cf6a8bcb04ccce10d2e5b34feec06 (diff)
downloadtextadept-18d7be2d1eaaef73c56dc850a3172529726d7a34.tar.gz
textadept-18d7be2d1eaaef73c56dc850a3172529726d7a34.zip
Added new `ui.dialogs` module for more user-friendly dialog support.
As a result, removed `ui.filteredlist()` and changed `io.open_file()` and `io.snapopen()` APIs to accept tables of files and paths instead of "\n" delimited strings.
Diffstat (limited to 'modules/textadept/bookmarks.lua')
-rw-r--r--modules/textadept/bookmarks.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/textadept/bookmarks.lua b/modules/textadept/bookmarks.lua
index 6c9f7a03..cd752ca7 100644
--- a/modules/textadept/bookmarks.lua
+++ b/modules/textadept/bookmarks.lua
@@ -53,8 +53,11 @@ function M.goto_mark(next)
marks[#marks + 1] = tostring(line + 1)..': '..text
line = buffer:marker_next(line + 1, 2^M.MARK_BOOKMARK)
until line < 0
- local line = ui.filteredlist(_L['Select Bookmark'], _L['Bookmark'], marks)
- if line then textadept.editing.goto_line(line:match('^%d+')) end
+ local button, i = ui.dialogs.filteredlist{
+ title = _L['Select Bookmark'], columns = _L['Bookmark'], items = marks
+ }
+ if button ~= 1 or not i then return end
+ textadept.editing.goto_line(marks[i]:match('^%d+'))
else
local f = next and buffer.marker_next or buffer.marker_previous
local current_line = buffer:line_from_position(buffer.current_pos)