aboutsummaryrefslogtreecommitdiff
path: root/core/ext/pm
diff options
context:
space:
mode:
Diffstat (limited to 'core/ext/pm')
-rw-r--r--core/ext/pm/buffer_browser.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/ext/pm/buffer_browser.lua b/core/ext/pm/buffer_browser.lua
index b92d2768..0bac4818 100644
--- a/core/ext/pm/buffer_browser.lua
+++ b/core/ext/pm/buffer_browser.lua
@@ -16,10 +16,12 @@ 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 = (buffer.filename or textadept.locale.UNTITLED):match('[^/\\]+$')
+ text = filename:match('[^/\\]+$')
}
end
return contents