aboutsummaryrefslogtreecommitdiff
path: root/core/ext/pm/buffer_browser.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-02-10 10:24:56 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-02-10 10:24:56 -0500
commitddcc45f0615ab6ba776635a15e2183f8d50401a7 (patch)
tree958e817be2c18db9005db29ddcbdeeb72350d77e /core/ext/pm/buffer_browser.lua
parent59c9eb6528d1759bc2734150cb3d99ec2e3eab5b (diff)
downloadtextadept-ddcc45f0615ab6ba776635a15e2183f8d50401a7.tar.gz
textadept-ddcc45f0615ab6ba776635a15e2183f8d50401a7.zip
Moved the textadept.locale table into the globals table.
Diffstat (limited to 'core/ext/pm/buffer_browser.lua')
-rw-r--r--core/ext/pm/buffer_browser.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/ext/pm/buffer_browser.lua b/core/ext/pm/buffer_browser.lua
index 0bac4818..e33c15aa 100644
--- a/core/ext/pm/buffer_browser.lua
+++ b/core/ext/pm/buffer_browser.lua
@@ -1,6 +1,7 @@
-- Copyright 2007-2009 Mitchell mitchell<att>caladbolg.net. See LICENSE.
local textadept = _G.textadept
+local locale = _G.locale
---
-- Buffer browser for the Textadept project manager.
@@ -16,12 +17,11 @@ end
function get_contents_for()
local contents = {}
for index, buffer in ipairs(textadept.buffers) do
- local filename =
- buffer.filename or buffer._type or textadept.locale.UNTITLED
index = string.format("%02i", index)
contents[index] = {
pixbuf = buffer.dirty and 'gtk-edit' or 'gtk-file',
- text = filename:match('[^/\\]+$')
+ text =
+ (buffer.filename or buffer._type or locale.UNTITLED):match('[^/\\]+$')
}
end
return contents
@@ -39,7 +39,6 @@ end
local ID = { NEW = 1, OPEN = 2, SAVE = 3, SAVEAS = 4, CLOSE = 5 }
function get_context_menu(selected_item)
- local locale = textadept.locale
return {
{ locale.PM_BROWSER_BUFFER_NEW, ID.NEW },
{ locale.PM_BROWSER_BUFFER_OPEN, ID.OPEN },