aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+667e-11@users.noreply.github.com>2016-06-15 08:50:54 -0400
committerGravatar mitchell <70453897+667e-11@users.noreply.github.com>2016-06-15 08:50:54 -0400
commit86ea01e60bfb452e274f0f8340bdbbea8db6ffd0 (patch)
treeaa51d5cb933dfe86c1c96fd777c24e105ca08725
parenta83a1d95ebbdfc62f848f813089002a274806e2f (diff)
Renamed `ui.SILENT_PRINT` to `ui.silent_print`.
-rw-r--r--core/ui.lua6
-rw-r--r--doc/manual.md3
-rw-r--r--modules/textadept/find.lua2
-rw-r--r--modules/textadept/run.lua4
4 files changed, 9 insertions, 6 deletions
diff --git a/core/ui.lua b/core/ui.lua
index 3c74923e..a529c4a4 100644
--- a/core/ui.lua
+++ b/core/ui.lua
@@ -26,7 +26,7 @@ local ui = ui
-- @field tabs (bool)
-- Whether or not to display the tab bar when multiple buffers are open.
-- The default value is `true`.
--- @field SILENT_PRINT (bool)
+-- @field silent_print (bool)
-- Whether or not to print messages to buffers silently.
-- This is not guaranteed to be a constant value, as Textadept may change it
-- for the editor's own purposes. This flag should be used only in conjunction
@@ -35,7 +35,7 @@ local ui = ui
-- to them.
module('ui')]]
-ui.SILENT_PRINT = false
+ui.silent_print = false
local theme = package.searchpath(not CURSES and 'light' or 'term',
_USERHOME..'/themes/?.lua;'..
@@ -57,7 +57,7 @@ local function _print(buffer_type, ...)
print_buffer = buffer.new()
print_buffer._type = buffer_type
events.emit(events.FILE_OPENED)
- elseif not ui.SILENT_PRINT then
+ elseif not ui.silent_print then
for i = 1, #_VIEWS do
if _VIEWS[i].buffer._type == buffer_type then ui.goto_view(i) break end
end
diff --git a/doc/manual.md b/doc/manual.md
index 0e0ddbfc..99467beb 100644
--- a/doc/manual.md
+++ b/doc/manual.md
@@ -1856,6 +1856,8 @@ Old API |Change |New API
**lfs** | |
FILTER |Renamed |[default\_filter][]
dir\_foreach() |Changed |[dir\_foreach()][] _(Changed args)_
+**ui** | |
+SILENT\_PRINT |Renamed |[silent\_print][]
**textadept.editing** | |
snapopen(...) |Changed |[quick\_open][](paths, filter, opts)
snapopen\_filters |Renamed |[quick\_open\_filters][]
@@ -1863,6 +1865,7 @@ SNAPOPEN\_MAX |Renamed |[quick\_open\_max][]
[default\_filter]: api.html#lfs.default_filter
[dir\_foreach()]: api.html#lfs.dir_foreach
+[silent\_print]: api.html#ui.silent_print
[quick\_open]: api.html#io.quick_open
[quick\_open\_filters]: api.html#io.quick_open_filters
[quick\_open\_max]: api.html#io.quick_open_max
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index 9689b025..2b88b3c7 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -264,7 +264,7 @@ function M.find_in_files(dir)
if M.whole_word then text = '%f[%w_]'..text..'%f[^%w_]' end -- TODO: wordchars
if buffer._type ~= _L['[Files Found Buffer]'] then preferred_view = view end
- ui.SILENT_PRINT = false
+ ui.silent_print = false
ui._print(_L['[Files Found Buffer]'], _L['Find:']..' '..text)
buffer.indicator_current = M.INDIC_FIND
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua
index 837de06a..fa49d746 100644
--- a/modules/textadept/run.lua
+++ b/modules/textadept/run.lua
@@ -131,9 +131,9 @@ local function run_command(commands, event)
preferred_view = view
local function emit_output(output, focus)
- ui.SILENT_PRINT = not focus
+ ui.silent_print = not focus
for line in output:gmatch('[^\r\n]+') do events.emit(event, data, line) end
- ui.SILENT_PRINT = false
+ ui.silent_print = false
end
local function emit_status(status) emit_output('> exit status: '..status) end