aboutsummaryrefslogtreecommitdiffhomepage
path: root/core
diff options
context:
space:
mode:
authorGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2021-02-09 12:58:21 -0500
committerGravatar mitchell <70453897+orbitalquark@users.noreply.github.com>2021-02-09 12:58:21 -0500
commitd807c2c2b005badbef80c45cc79d0f5ed5730ba9 (patch)
treec5b56dc8e9f364dc99a230502ccedcfc4c2c8486 /core
parentf001ff09ff3a8b34c8550a66a31e1dd89955f038 (diff)
Added `ui.SHOW_ALL_TABS` option for `ui.tabs`.
Textadept hides the first tab by default since its information is duplicated in the titlebar and screen space is wasted. However, some users choose to hide titlebars (e.g. on window maximize/fullscreen), so this option now exists.
Diffstat (limited to 'core')
-rw-r--r--core/ui.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/ui.lua b/core/ui.lua
index 497cadc4..19bf5881 100644
--- a/core/ui.lua
+++ b/core/ui.lua
@@ -26,6 +26,8 @@ local ui = ui
-- @field tabs (bool)
-- Whether or not to display the tab bar when multiple buffers are open.
-- The default value is `true`.
+-- A third option, `ui.SHOW_ALL_TABS` may be used to always show the tab bar,
+-- even if only one buffer is open.
-- @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
@@ -33,8 +35,12 @@ local ui = ui
-- with a group of [`ui.print()`]() and [`ui._print()`]() function calls.
-- The default value is `false`, and focuses buffers when messages are printed
-- to them.
+-- @field SHOW_ALL_TABS (number)
+--
module('ui')]]
+ui.SHOW_ALL_TABS = 2 -- ui.tabs options must be greater than 1
+
ui.silent_print = false
-- Helper function for jumping to another view to print to, or creating a new