mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 23:54:12 +01:00
Fix ;t and ;b extended hint modes in the MOW.
This commit is contained in:
@@ -1412,25 +1412,53 @@ function CommandLine() //{{{
|
||||
let closeWindow = false;
|
||||
let passEvent = false;
|
||||
|
||||
function isScrollable() !win.scrollMaxY == 0;
|
||||
function atEnd() win.scrollY / win.scrollMaxY >= 1;
|
||||
let key = events.toString(event);
|
||||
|
||||
if (event.type == "click")
|
||||
// TODO: Wouldn't multiple handlers be cleaner? --djk
|
||||
if (event.type == "click" && event.target instanceof HTMLAnchorElement)
|
||||
{
|
||||
if (event.target instanceof HTMLAnchorElement && event.button < 2)
|
||||
function openLink(where)
|
||||
{
|
||||
event.preventDefault();
|
||||
let target = event.button == 0 ? liberator.CURRENT_TAB : liberator.NEW_TAB;
|
||||
// FIXME: Why is this needed? --djk
|
||||
if (event.target.getAttribute("href") == "#")
|
||||
liberator.open(event.target.textContent, target);
|
||||
liberator.open(event.target.textContent, where);
|
||||
else
|
||||
liberator.open(event.target.href, target);
|
||||
liberator.open(event.target.href, where);
|
||||
}
|
||||
|
||||
switch (key)
|
||||
{
|
||||
case "<LeftMouse>":
|
||||
// FIXME: the :ls output no longer wraps the buffer URL in an anchor element
|
||||
if (event.originalTarget.getAttributeNS(NS.uri, "highlight") == "URL buffer-list")
|
||||
{
|
||||
event.preventDefault();
|
||||
tabs.select(parseInt(event.originalTarget.parentNode.parentNode.firstChild.textContent, 10) - 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
openLink(liberator.CURRENT_TAB);
|
||||
}
|
||||
break;
|
||||
case "<MiddleMouse>":
|
||||
case "<C-LeftMouse>":
|
||||
case "<C-M-LeftMouse>":
|
||||
openLink(liberator.NEW_BACKGROUND_TAB);
|
||||
break;
|
||||
case "<S-MiddleMouse>":
|
||||
case "<C-S-LeftMouse>":
|
||||
case "<C-M-S-LeftMouse>":
|
||||
openLink(liberator.NEW_TAB);
|
||||
break;
|
||||
case "<S-LeftMouse>":
|
||||
openLink(liberator.NEW_WINDOW);
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
let key = events.toString(event);
|
||||
|
||||
if (startHints)
|
||||
{
|
||||
statusline.updateInputBuffer("");
|
||||
@@ -1439,6 +1467,9 @@ function CommandLine() //{{{
|
||||
return;
|
||||
}
|
||||
|
||||
function isScrollable() !win.scrollMaxY == 0;
|
||||
function atEnd() win.scrollY / win.scrollMaxY >= 1;
|
||||
|
||||
switch (key)
|
||||
{
|
||||
case "<Esc>":
|
||||
@@ -1488,34 +1519,6 @@ function CommandLine() //{{{
|
||||
break;
|
||||
|
||||
// TODO: <LeftMouse> on the prompt line should scroll one page
|
||||
case "<LeftMouse>":
|
||||
if (event.originalTarget.getAttributeNS(NS.uri, "highlight") == "URL buffer-list")
|
||||
{
|
||||
tabs.select(parseInt(event.originalTarget.parentNode.parentNode.firstChild.textContent, 10) - 1);
|
||||
closeWindow = true;
|
||||
break;
|
||||
}
|
||||
else if (event.originalTarget.localName.toLowerCase() == "a")
|
||||
{
|
||||
liberator.open(event.originalTarget.textContent);
|
||||
break;
|
||||
}
|
||||
case "<A-LeftMouse>": // for those not owning a 3-button mouse
|
||||
case "<MiddleMouse>":
|
||||
if (event.originalTarget.localName.toLowerCase() == "a")
|
||||
{
|
||||
let where = /\btabopen\b/.test(options["activate"]) ?
|
||||
liberator.NEW_TAB : liberator.NEW_BACKGROUND_TAB;
|
||||
liberator.open(event.originalTarget.textContent, where);
|
||||
}
|
||||
break;
|
||||
|
||||
// let Firefox handle those to select table cells or show a context menu
|
||||
case "<C-LeftMouse>":
|
||||
case "<RightMouse>":
|
||||
case "<C-S-LeftMouse>":
|
||||
break;
|
||||
|
||||
// page down
|
||||
case "f":
|
||||
if (options["more"] && isScrollable())
|
||||
@@ -1606,7 +1609,7 @@ function CommandLine() //{{{
|
||||
if (passEvent)
|
||||
events.onKeyPress(event);
|
||||
}
|
||||
else // set update the prompt string
|
||||
else
|
||||
{
|
||||
commandline.updateMorePrompt(showMorePrompt, showMoreHelpPrompt);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,6 @@ BUGS:
|
||||
- insert abbreviations broken on <space>
|
||||
- :sidebar improvements (:sidebar! Downloads while downloads is open should refocus the sidebar)
|
||||
- ;s saves the page rather than the image
|
||||
- http://cgiirc.blitzed.org?chan=%23debug is unusable after login in
|
||||
- "g<" fails without a trailing escape because both "g<" and "g<C-g>"
|
||||
are mapped. Vimp should recognize "<C-g>" as an atom that should not
|
||||
be matched literally. In fact, typing "g<C-g>" out literally is
|
||||
@@ -33,14 +32,13 @@ BUGS:
|
||||
=> it often overwrites the open command line while editing etc.
|
||||
- <tags> and <keyword> autocmd 'keywords' are not available when adding a
|
||||
bookmark - they're being set after the observer triggers the autocmd event.
|
||||
- MOW rendering is broken for multiple commands when open E.g. :ls | ls
|
||||
- completion height is broken, try :a<tab>....<tab>, when it wraps it's totally off.
|
||||
and even if it is not totally off, i had it jump by one pixel when wrapping around.
|
||||
If that's unfixable, i propose reverting the new completion height stuff.
|
||||
- MOW rendering is broken for multiple commands when open (E.g. :ls | ls) This
|
||||
appears to be the result of using the Message class when appending multiline
|
||||
output to an open MOW.
|
||||
- :messages is _very_ slow for message history of several thousand lines ->
|
||||
Unresponsive Script: util.js:79 (sometimes xmlToDom() and elsewhere)
|
||||
- :hardcopy! seems to be broken for me
|
||||
- some extended hint commands aren't working in the MOW (;; ;t ;b ;? ;F)
|
||||
- The MOW shouldn't close when executing hints and ;F isn't working.
|
||||
- URLs in :ls output are no longer hyperlinks
|
||||
|
||||
FEATURES:
|
||||
9 finish :help TODOs
|
||||
|
||||
Reference in New Issue
Block a user