From 6ceffde0ec4421b46a349b97d56eaa9144c21625 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 25 Mar 2011 17:20:59 -0400 Subject: Snapopen allows multiple files to be selected now. --- core/.gui.luadoc | 3 ++- core/gui.lua | 2 +- core/locale.conf | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/.gui.luadoc b/core/.gui.luadoc index 3adba5c8..785ce52b 100644 --- a/core/.gui.luadoc +++ b/core/.gui.luadoc @@ -92,7 +92,8 @@ function dialog(kind, ...) end -- @param columns A column name or list of column names. -- @param items An item or list of items. -- @param int_return If true, returns the integer index of the selected item in --- the filteredlist. Defaults to false which returns the string item. +-- the filteredlist. Defaults to false, which returns the string item. Not +-- compatible with a '--select-multiple' filteredlist. -- @param ... Additional parameters to pass to gui.dialog(). -- @return Either a string or integer on success; nil otherwise. -- @usage gui.filteredlist('Title', 'Foo', { 'Bar', 'Baz' }) diff --git a/core/gui.lua b/core/gui.lua index a7725e29..4a67b220 100644 --- a/core/gui.lua +++ b/core/gui.lua @@ -65,7 +65,7 @@ function gui.filteredlist(title, columns, items, int_return, ...) '--columns', columns, '--items', items, ...) - local patt = int_return and '(%-?%d+)\n(%d+)$' or '([^\n]+)\n([^\n]+)$' + local patt = int_return and '^(%-?%d+)\n(%d+)$' or '^([^\n]+)\n(.+)$' local response, value = out:match(patt) if response == (int_return and '1' or 'gtk-ok') then return not int_return and value or tonumber(value) diff --git a/core/locale.conf b/core/locale.conf index f206afc7..3c4d9510 100644 --- a/core/locale.conf +++ b/core/locale.conf @@ -214,3 +214,4 @@ The following session files were not found = The following session files were no % modules/textadept/snapopen.lua File Limit Exceeded = File Limit Exceeded files or more were found. Showing the first = files or more were found. Showing the first +File = File -- cgit v1.2.3