mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 22:28:00 +01:00
Replace 'laststatus' with a 'guioptions' flag.
This commit is contained in:
@@ -811,7 +811,6 @@ const Buffer = Module("buffer", {
|
||||
* contains at least one frame.
|
||||
*
|
||||
* @param {number} count The number of frames to skip through.
|
||||
* @param {boolean} forward The direction of motion.
|
||||
*/
|
||||
shiftFrameFocus: function (count) {
|
||||
if (!(window.content.document instanceof HTMLDocument))
|
||||
@@ -829,10 +828,6 @@ const Buffer = Module("buffer", {
|
||||
rect.width && rect.height);
|
||||
|
||||
// find the currently focused frame index
|
||||
// TODO: If the window is a frameset then the first _frame_ should be
|
||||
// focused. Since this is not the current FF behavior,
|
||||
// we initialize current to -1 so the first call takes us to the
|
||||
// first frame.
|
||||
let current = Math.max(0, frames.indexOf(buffer.focusedFrame));
|
||||
|
||||
// calculate the next frame to focus
|
||||
@@ -840,7 +835,6 @@ const Buffer = Module("buffer", {
|
||||
if (next < 0 || next >= frames.length)
|
||||
dactyl.beep();
|
||||
next = Math.constrain(next, 0, frames.length - 1);
|
||||
util.dump(current, count, next, String(frames[next]));
|
||||
|
||||
// focus next frame and scroll into view
|
||||
frames[next].focus();
|
||||
|
||||
@@ -1161,7 +1161,9 @@ const Dactyl = Module("dactyl", {
|
||||
}
|
||||
},
|
||||
{
|
||||
opts: config.guioptions,
|
||||
opts: update({
|
||||
s: ["Status bar", [statusline.statusBar.id]]
|
||||
}, config.guioptions),
|
||||
setter: function (opts) {
|
||||
for (let [opt, [, ids]] in Iterator(this.opts)) {
|
||||
ids.map(function (id) document.getElementById(id))
|
||||
|
||||
@@ -274,31 +274,6 @@ const StatusLine = Module("statusline", {
|
||||
this.widgets.zoomlevel.value = " (" + percent + "%)";
|
||||
}
|
||||
}
|
||||
|
||||
}, {
|
||||
}, {
|
||||
options: function () {
|
||||
options.add(["laststatus", "ls"],
|
||||
"Show the status line",
|
||||
"number", 2,
|
||||
{
|
||||
setter: function setter(value) {
|
||||
if (value == 0)
|
||||
statusline.statusBar.collapsed = true;
|
||||
else if (value == 1)
|
||||
dactyl.echoerr("show status line only with > 1 window not implemented yet");
|
||||
else
|
||||
statusline.statusBar.collapsed = false;
|
||||
commandline.widgets.updateVisibility();
|
||||
return value;
|
||||
},
|
||||
completer: function completer(context) [
|
||||
["0", "Never display status line"],
|
||||
["1", "Display status line only if there are multiple windows"],
|
||||
["2", "Always display status line"]
|
||||
]
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// vim: set fdm=marker sw=4 ts=4 et:
|
||||
|
||||
@@ -675,7 +675,7 @@
|
||||
<tags>'go' 'guioptions'</tags>
|
||||
<spec>'guioptions' 'go'</spec>
|
||||
<type>charlist</type>
|
||||
<default>rbC</default> <!-- TODO: make this config specific -->
|
||||
<default>bCrs</default> <!-- TODO: make this config specific -->
|
||||
<description>
|
||||
<p>Show or hide certain GUI elements.</p>
|
||||
|
||||
@@ -693,6 +693,7 @@
|
||||
<dt>m</dt> <dd>Menu bar</dd>
|
||||
<dt>n</dt> <dd>Tab number</dd>
|
||||
<dt>r</dt> <dd>Right scrollbar</dd>
|
||||
<dt>s</dt> <dd>Status bar</dd>
|
||||
</dl>
|
||||
|
||||
<p>See also <o>showtabline</o>.</p>
|
||||
@@ -911,26 +912,6 @@
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<tags>'ls' 'laststatus'</tags>
|
||||
<spec>'laststatus' 'ls'</spec>
|
||||
<type>number</type>
|
||||
<default>2</default>
|
||||
<description>
|
||||
<p>Determines when the status line is shown.</p>
|
||||
|
||||
<p>Possible values:</p>
|
||||
|
||||
<dl dt="width: 6em;">
|
||||
<dt>0</dt> <dd>Never</dd>
|
||||
<dt>1</dt> <dd>Only if there are multiple windows</dd>
|
||||
<dt>2</dt> <dd>Always</dd>
|
||||
</dl>
|
||||
|
||||
<note>laststatus=1 is not implemented.</note>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<tags>'nolks' 'nolinksearch'</tags>
|
||||
<tags>'lks' 'linksearch'</tags>
|
||||
|
||||
@@ -23,7 +23,7 @@ const Config = Module("config", ConfigBase, {
|
||||
/*** optional options, there are checked for existence and a fallback provided ***/
|
||||
features: ["bookmarks", "hints", "marks", "history", "quickmarks", "session", "tabs", "player"],
|
||||
defaults: {
|
||||
guioptions: "mprb",
|
||||
guioptions: "smprb",
|
||||
showtabline: 2,
|
||||
get titlestring() config.name
|
||||
},
|
||||
|
||||
@@ -49,6 +49,8 @@
|
||||
* The concept of completion contexts is now exposed to the user
|
||||
(see :h :contexts), allowing for powerful and fine-grained
|
||||
completion system customization.
|
||||
* IMPORTANT: 'laststatus' has been replaced with the ‘s’ flag in
|
||||
'guioptions'
|
||||
* IMPORTANT: Command script files now use the *.penta file extension.
|
||||
* IMPORTANT: Plugins are now loaded from the 'plugins/'
|
||||
directory in 'runtimepath' rather than 'plugin/'.
|
||||
|
||||
@@ -31,7 +31,7 @@ const Config = Module("config", ConfigBase, {
|
||||
|
||||
defaults: {
|
||||
complete: "slf",
|
||||
guioptions: "rbC",
|
||||
guioptions: "bCrs",
|
||||
showtabline: 2,
|
||||
titlestring: "Pentadactyl"
|
||||
},
|
||||
|
||||
@@ -51,7 +51,7 @@ const Config = Module("config", ConfigBase, {
|
||||
},
|
||||
|
||||
defaults: {
|
||||
guioptions: "frb",
|
||||
guioptions: "bfrs",
|
||||
showtabline: 1,
|
||||
titlestring: "Teledactyl"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user