mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-03 09:15:44 +01:00
Add go+=c and move the mode message to the left of the status-line. CSS needs some work.
This commit is contained in:
@@ -15,9 +15,7 @@ const Abbreviation = Class("Abbreviation", {
|
||||
this.rhs = rhs;
|
||||
},
|
||||
|
||||
equals: function (other) {
|
||||
return this.lhs == other.lhs && this.rhs == other.rhs;
|
||||
},
|
||||
equals: function (other) this.lhs == other.lhs && this.rhs == other.rhs,
|
||||
|
||||
expand: function (editor) String(callable(this.rhs) ? this.rhs(editor) : this.rhs),
|
||||
|
||||
|
||||
@@ -19,8 +19,12 @@ const CommandWidgets = Class("CommandWidgets", {
|
||||
this.addElem({
|
||||
name: "commandline",
|
||||
getGroup: function () options.get("guioptions").has("C") ? this.commandbar : this.statusbar,
|
||||
getValue: function () this.command,
|
||||
noValue: true,
|
||||
getValue: function () this.command
|
||||
});
|
||||
this.addElem({
|
||||
name: "strut",
|
||||
getGroup: function () this.commandbar,
|
||||
getValue: function () options.get("guioptions").has("c")
|
||||
});
|
||||
this.addElem({
|
||||
name: "command",
|
||||
@@ -85,7 +89,7 @@ const CommandWidgets = Class("CommandWidgets", {
|
||||
memoize(this.statusbar, obj.name, function () get("dactyl-statusline-field-" + (obj.id || obj.name)));
|
||||
memoize(this.commandbar, obj.name, function () get("dactyl-" + (obj.id || obj.name)));
|
||||
|
||||
if (!obj.noValue)
|
||||
if (!(obj.noValue || obj.getValue))
|
||||
Object.defineProperty(this, obj.name, Modes.boundProperty({
|
||||
get: function () {
|
||||
let elem = self.getGroup(obj.name, obj.value)[obj.name];
|
||||
@@ -543,7 +547,7 @@ const CommandLine = Module("commandline", {
|
||||
this.hide();
|
||||
|
||||
let field = this.widgets.active.message.inputField;
|
||||
if (!forceSingle && field.editor.rootElement.scrollWidth > field.scrollWidth) {
|
||||
if (field.value && !forceSingle && field.editor.rootElement.scrollWidth > field.scrollWidth) {
|
||||
this.widgets.message = null;
|
||||
this._echoMultiline(<span highlight="Message">{str}</span>, highlightGroup);
|
||||
}
|
||||
@@ -658,7 +662,7 @@ const CommandLine = Module("commandline", {
|
||||
this._echoMultiline(<span highlight="Message">{this._lastEcho}</span>,
|
||||
this.widgets.message[0]);
|
||||
|
||||
if (action == this._echoLine && !(flags & this.FORCE_MULTILINE) && !this.widgets.mowContainer.collapsed) {
|
||||
if (action === this._echoLine && !(flags & this.FORCE_MULTILINE) && !this.widgets.mowContainer.collapsed) {
|
||||
highlightGroup += " Message";
|
||||
action = this._echoMultiline;
|
||||
}
|
||||
|
||||
@@ -185,7 +185,7 @@ const ConfigBase = Class(ModuleBase, {
|
||||
StatusInfoMsg color: inherit !important; background: inherit !important;
|
||||
LineNr color: orange !important; background: white !important;
|
||||
ModeMsg color: black !important; background: white !important;
|
||||
StatusModeMsg color: inherit !important; background: inherit !important;
|
||||
StatusModeMsg color: inherit !important; background: inherit !important; padding-right: 1em;
|
||||
MoreMsg color: green !important; background: white !important;
|
||||
StatusMoreMsg background: inherit !important;
|
||||
Message white-space: normal; min-width: 100%; padding-left: 2em; text-indent: -2em; display: block;
|
||||
|
||||
@@ -1127,8 +1127,9 @@ const Dactyl = Module("dactyl", {
|
||||
const groups = {
|
||||
commandline: {
|
||||
opts: {
|
||||
M: ["Always show messages outside of the status line"],
|
||||
c: ["Always show the command-line, even when empty"],
|
||||
C: ["Always show the command-line outside of the status line"],
|
||||
M: ["Always show messages outside of the status line"]
|
||||
},
|
||||
setter: function (opts) {
|
||||
commandline.widgets.updateVisibility();
|
||||
|
||||
@@ -83,6 +83,7 @@
|
||||
</vbox>
|
||||
|
||||
<stack orient="horizontal" align="stretch" class="dactyl-container" id="dactyl-container" dactyl:highlight="CmdLine CmdCmdLine">
|
||||
<textbox class="plain" id="dactyl-strut" flex="1" crop="end" collapsed="true"/>
|
||||
<textbox class="plain" id="dactyl-mode" flex="1" crop="end"/>
|
||||
<textbox class="plain" id="dactyl-message" flex="1" readonly="true"/>
|
||||
|
||||
@@ -106,9 +107,13 @@
|
||||
<hbox insertbefore="&dactyl.statusBefore;" insertafter="&dactyl.statusAfter;"
|
||||
style="background: inherit;" id="&status;container" flex="1" hidden="false" align="center">
|
||||
<stack orient="horizontal" align="stretch" flex="1" class="dactyl-container" dactyl:highlight="CmdLine StatusCmdLine">
|
||||
<textbox class="plain" id="&status;url" flex="1" readonly="true" crop="end"/>
|
||||
<label class="plain" id="&status;mode" flex="1" crop="end" collapsed="true"/>
|
||||
<textbox class="plain" id="&status;message" flex="1" readonly="true" crop="end" collapsed="true" dactyl:highlight="Normal StatusNormal"/>
|
||||
<hbox class="dactyl-container" dactyl:highlight="CmdLine StatusCmdLine">
|
||||
<label class="plain" id="&status;mode" crop="end" collapsed="true"/>
|
||||
<stack flex="1" class="dactyl-container" dactyl:highlight="CmdLine StatusCmdLine">
|
||||
<textbox class="plain" id="&status;url" crop="end" flex="1" readonly="true"/>
|
||||
<textbox class="plain" id="&status;message" crop="end" flex="1" readonly="true" dactyl:highlight="Normal StatusNormal"/>
|
||||
</stack>
|
||||
</hbox>
|
||||
|
||||
<hbox id="&status;commandline" hidden="false" class="dactyl-container" dactyl:highlight="Normal StatusNormal" collapsed="true">
|
||||
<label id="&status;commandline-prompt" class="dactyl-commandline-prompt plain" flex="0" crop="end" value="" collapsed="true"/>
|
||||
|
||||
@@ -637,6 +637,7 @@
|
||||
<dt>N</dt> <dd>Tab number over image</dd>
|
||||
<dt>T</dt> <dd>Toolbar</dd>
|
||||
<dt>b</dt> <dd>Bottom scrollbar</dd>
|
||||
<dt>c</dt> <dd>Always show messages outside of the status line</dd>
|
||||
<dt>l</dt> <dd>Left scrollbar (<em>l</em> and <em>r</em> are mutually exclusive)</dd>
|
||||
<dt>m</dt> <dd>Menu bar</dd>
|
||||
<dt>n</dt> <dd>Tab number</dd>
|
||||
|
||||
@@ -77,6 +77,10 @@
|
||||
background: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
[dactyl|highlight~=CmdLine],
|
||||
[dactyl|highlight~=CmdLine] > [dactyl|highlight~=CmdLine] {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
label[collapsed=true] {
|
||||
height: 0px;
|
||||
|
||||
@@ -18,13 +18,14 @@
|
||||
- Backtracks to the first successful match after pressing
|
||||
backspace.
|
||||
- Supports reverse incremental search.
|
||||
- Input boxes are not focused when matches are highlighted.
|
||||
* Ex command parsing improvements, including:
|
||||
- Multiple Ex commands may now be separated by |
|
||||
- Commands can continue over multiple lines in RC files by
|
||||
prefixing the continuation lines with a \
|
||||
- The \ character is no longer treated specially within single
|
||||
quotes, i.e., 'fo\o''bar' ⇒ fo\o'bar
|
||||
* Command line is now hidden by default. Added C and M to
|
||||
* Command line is now hidden by default. Added c, C, and M to
|
||||
'guioptions'.
|
||||
* Hint mode improvements, including:
|
||||
- Added g; continued extended hint mode, which allows
|
||||
|
||||
Reference in New Issue
Block a user