mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 15:48:00 +01:00
* only switch tabs when clicking the URL in :ls, to make it easier to select text
* allow ctrl-(shift-)-clicks to select cells in the MOW
This commit is contained in:
@@ -209,7 +209,6 @@ function Buffer() //{{{
|
||||
return selection;
|
||||
}
|
||||
|
||||
// TODO: move to v.buffers.list()
|
||||
this.list = function(fullmode)
|
||||
{
|
||||
if (fullmode)
|
||||
@@ -247,9 +246,9 @@ function Buffer() //{{{
|
||||
url = vimperator.util.escapeHTML(url);
|
||||
title = vimperator.util.escapeHTML(title);
|
||||
|
||||
list += "<tr class=\"buffer-list\"><td align=\"right\"> " + number + "</td><td>" + indicator +
|
||||
list += "<tr><td align=\"right\"> " + number + "</td><td>" + indicator +
|
||||
"</td><td style=\"width: 250px; max-width: 500px; overflow: hidden;\">" + title +
|
||||
"</td><td class=\"hl-URL\">" + url + "</td></tr>";
|
||||
"</td><td class=\"hl-URL buffer-list\">" + url + "</td></tr>";
|
||||
}
|
||||
list += "</table>";
|
||||
|
||||
|
||||
@@ -694,7 +694,7 @@ function CommandLine() //{{{
|
||||
break;
|
||||
|
||||
case "<LeftMouse>":
|
||||
if (event.originalTarget.parentNode.className == "buffer-list")
|
||||
if (event.originalTarget.className == "hl-URL buffer-list")
|
||||
{
|
||||
vimperator.tabs.select(parseInt(event.originalTarget.parentNode.firstChild.textContent) - 1);
|
||||
close_window = true;
|
||||
@@ -705,13 +705,19 @@ function CommandLine() //{{{
|
||||
vimperator.open(event.originalTarget.textContent);
|
||||
break;
|
||||
}
|
||||
case "<A-LeftMouse>":
|
||||
case "<C-LeftMouse>":
|
||||
case "<A-LeftMouse>": // for those not owning a 3-button mouse
|
||||
case "<MiddleMouse>":
|
||||
if (event.originalTarget.localName.toLowerCase() == "a")
|
||||
{
|
||||
vimperator.open(event.originalTarget.textContent, vimperator.NEW_BACKGROUND_TAB);
|
||||
break;
|
||||
}
|
||||
|
||||
// let firefox handle those to select table cells or show a context menu
|
||||
case "<C-LeftMouse>":
|
||||
case "<RightMouse>":
|
||||
case "<C-S-LeftMouse>":
|
||||
break;
|
||||
|
||||
// XXX: what's that for? --mst
|
||||
case "<S-LeftMouse>":
|
||||
if (/^(end|more(-help)?)-prompt$/.test(event.target.id))
|
||||
; // fall through
|
||||
|
||||
Reference in New Issue
Block a user