aboutsummaryrefslogtreecommitdiff
path: root/core/ext
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2009-02-10 10:02:06 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2009-02-10 10:02:06 -0500
commit59c9eb6528d1759bc2734150cb3d99ec2e3eab5b (patch)
treeac3acec9ffd7ec3835149ff79bca736f8e337f3f /core/ext
parent5e83c949c15f75858e1602a6989c8c3d20753be3 (diff)
downloadtextadept-59c9eb6528d1759bc2734150cb3d99ec2e3eab5b.tar.gz
textadept-59c9eb6528d1759bc2734150cb3d99ec2e3eab5b.zip
Use a _type field for special _print() buffers' titles instead of 'Untitled'.
Diffstat (limited to 'core/ext')
-rw-r--r--core/ext/find.lua5
-rw-r--r--core/ext/pm/buffer_browser.lua4
2 files changed, 6 insertions, 3 deletions
diff --git a/core/ext/find.lua b/core/ext/find.lua
index cc7763d6..566ff0d9 100644
--- a/core/ext/find.lua
+++ b/core/ext/find.lua
@@ -124,7 +124,8 @@ function find.find(text, next, flags, nowrap, wrapped)
if #matches == 1 then matches[2] = locale.FIND_NO_RESULTS end
matches[#matches + 1] = ''
previous_view = view
- textadept._print('shows_files_found', table.concat(matches, '\n'))
+ textadept._print(locale.FIND_FILES_FOUND_BUFFER,
+ table.concat(matches, '\n'))
end
return
end
@@ -255,7 +256,7 @@ end
-- @param pos The position of the caret.
-- @param line_num The line double-clicked.
function goto_file(pos, line_num)
- if buffer.shows_files_found then
+ if buffer._type == textadept.locale.FIND_FILES_FOUND_BUFFER then
line = buffer:get_line(line_num)
local file, line_num = line:match('^(.+):(%d+):.+$')
if file and line_num then
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