aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-03-01 11:34:07 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2012-03-01 11:34:07 -0500
commitb7600e8ebeffd233eba8fb3d821a79d689b11aa6 (patch)
tree0c74b9e7c5fe68dbb96b4ddd9939034042c4e941 /core
parent6ccc70fcce700ca7ebe8af203393a9c07831a933 (diff)
downloadtextadept-b7600e8ebeffd233eba8fb3d821a79d689b11aa6.tar.gz
textadept-b7600e8ebeffd233eba8fb3d821a79d689b11aa6.zip
Fixed bug introduced by 1053; core/gui.lua
Diffstat (limited to 'core')
-rw-r--r--core/gui.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/gui.lua b/core/gui.lua
index ce9b96d6..c11451a2 100644
--- a/core/gui.lua
+++ b/core/gui.lua
@@ -108,8 +108,8 @@ function gui.switch_buffer()
local columns, items = { _L['Name'], _L['File'] }, {}
for _, buffer in ipairs(_BUFFERS) do
local filename = buffer.filename or buffer._type or _L['Untitled']
- if buffer.filename then filename = filename:match('[^/\\]+$') end
- items[#items + 1] = (buffer.dirty and '*' or '')..filename
+ local basename = buffer.filename and filename:match('[^/\\]+$') or filename
+ items[#items + 1] = (buffer.dirty and '*' or '')..basename
items[#items + 1] = filename
end
local i = gui.filteredlist(_L['Switch Buffers'], columns, items, true)
@@ -286,8 +286,8 @@ end)
-- @param buffer The global buffer.
local function set_title(buffer)
local filename = buffer.filename or buffer._type or _L['Untitled']
- if buffer.filename then filename = filename:match('[^/\\]+$') end
- gui.title = string.format('%s %s Textadept (%s)', filename,
+ local basename = buffer.filename and filename:match('[^/\\]+$') or filename
+ gui.title = string.format('%s %s Textadept (%s)', basename,
buffer.dirty and '*' or '-', filename)
end