aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2013-09-05 22:13:35 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2013-09-05 22:13:35 -0400
commitc1f943631f518390869220966cfd10dfa4278165 (patch)
treed0034ae169e86f558577783a03e4fe4139dcc4b9
parent0d09f7cdc7b8ef2ac18eb91ee07031f6a006ce5e (diff)
downloadtextadept-c1f943631f518390869220966cfd10dfa4278165.tar.gz
textadept-c1f943631f518390869220966cfd10dfa4278165.zip
Renamed `ui.docstatusbar_text` to `ui.bufstatusbar_text`.
-rw-r--r--core/ui.lua8
-rw-r--r--doc/14_Appendix.md2
-rw-r--r--src/textadept.c4
3 files changed, 8 insertions, 6 deletions
diff --git a/core/ui.lua b/core/ui.lua
index d4743a44..d347d724 100644
--- a/core/ui.lua
+++ b/core/ui.lua
@@ -6,7 +6,7 @@ local ui = ui
---
-- Utilities for interacting with Textadept's user interface.
-- @field title (string, Write-only)
--- The title of the Textadept window.
+-- The title text of the Textadept window.
-- @field context_menu
-- The editor's context menu, a [`ui.menu()`](#menu).
-- This is a low-level field. You probably want to use the higher-level
@@ -15,7 +15,7 @@ local ui = ui
-- The text on the clipboard.
-- @field statusbar_text (string, Write-only)
-- The text displayed by the statusbar.
--- @field docstatusbar_text (string, Write-only)
+-- @field bufstatusbar_text (string, Write-only)
-- The text displayed by the buffer statusbar.
-- @field maximized (bool)
-- Whether or not the Textadept window is maximized.
@@ -289,7 +289,7 @@ end)
local EOLs = {_L['CRLF'], _L['CR'], _L['LF']}
local GETLEXERLANGUAGE = _SCINTILLA.properties.lexer_language[1]
--- Sets docstatusbar text.
+-- Sets buffer statusbar text.
events_connect(events.UPDATE_UI, function()
local pos = buffer.current_pos
local line, max = buffer:line_from_position(pos) + 1, buffer.line_count
@@ -301,7 +301,7 @@ events_connect(events.UPDATE_UI, function()
local enc = buffer.encoding or ''
local text = not CURSES and '%s %d/%d %s %d %s %s %s %s' or
'%s %d/%d %s %d %s %s %s %s'
- ui.docstatusbar_text = string.format(text, _L['Line:'], line, max, _L['Col:'],
+ ui.bufstatusbar_text = string.format(text, _L['Line:'], line, max, _L['Col:'],
col, lexer, eol, tabs, enc)
end)
diff --git a/doc/14_Appendix.md b/doc/14_Appendix.md
index 682582fb..be7a0235 100644
--- a/doc/14_Appendix.md
+++ b/doc/14_Appendix.md
@@ -182,6 +182,7 @@ get\_style\_name(buffer, n) |Renamed |[style\_name][]\[n\]
N/A |New |[INITIALIZED][]<sup>‡</sup>
handlers |Removed |N/A
**gui** |Renamed |[ui][]
+docstatusbar\_text |Renamed |[bufstatusbar\_text][]
N/A |New |[maximized][]
find.goto\_file\_in\_list() |Renamed |find.[goto\_file\_found()][]
select\_theme |Removed |N/A
@@ -212,6 +213,7 @@ not all buffer functions are available at the `require()` stage. See
[style\_name]: api/buffer.html#style_name
[INITIALIZED]: api/events.html#INITIALIZED
[ui]: api/ui.html
+[bufstatusbar\_text]: api/ui.html#bufstatusbar_text
[maximized]: api/ui.html#maximized
[goto\_file\_found()]: api/ui.find.html#goto_file_found
[encodings]: api/io.html#encodings
diff --git a/src/textadept.c b/src/textadept.c
index 355ad03d..d8f7d097 100644
--- a/src/textadept.c
+++ b/src/textadept.c
@@ -964,10 +964,10 @@ static int lui__newindex(lua_State *L) {
#endif
} else if (strcmp(key, "clipboard_text") == 0)
luaL_argerror(L, 3, "read-only property");
- else if (strcmp(key, "docstatusbar_text") == 0)
- set_statusbar_text(lua_tostring(L, 3), 1);
else if (strcmp(key, "statusbar_text") == 0)
set_statusbar_text(lua_tostring(L, 3), 0);
+ else if (strcmp(key, "bufstatusbar_text") == 0)
+ set_statusbar_text(lua_tostring(L, 3), 1);
else if (strcmp(key, "menubar") == 0) {
#if GTK
luaL_argcheck(L, lua_istable(L, 3), 3, "table of menus expected");