From 18d7be2d1eaaef73c56dc850a3172529726d7a34 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 29 Sep 2013 21:09:56 -0400 Subject: 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. --- modules/textadept/bookmarks.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/textadept/bookmarks.lua') 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) -- cgit v1.2.3