1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 18:37:58 +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:
Martin Stubenschrott
2007-10-16 13:27:28 +00:00
parent 9fbdfcedc2
commit 329df9b7cd
2 changed files with 14 additions and 9 deletions

View File

@@ -209,7 +209,6 @@ function Buffer() //{{{
return selection; return selection;
} }
// TODO: move to v.buffers.list()
this.list = function(fullmode) this.list = function(fullmode)
{ {
if (fullmode) if (fullmode)
@@ -247,9 +246,9 @@ function Buffer() //{{{
url = vimperator.util.escapeHTML(url); url = vimperator.util.escapeHTML(url);
title = vimperator.util.escapeHTML(title); 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 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>"; list += "</table>";

View File

@@ -694,7 +694,7 @@ function CommandLine() //{{{
break; break;
case "<LeftMouse>": 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); vimperator.tabs.select(parseInt(event.originalTarget.parentNode.firstChild.textContent) - 1);
close_window = true; close_window = true;
@@ -705,13 +705,19 @@ function CommandLine() //{{{
vimperator.open(event.originalTarget.textContent); vimperator.open(event.originalTarget.textContent);
break; break;
} }
case "<A-LeftMouse>": case "<A-LeftMouse>": // for those not owning a 3-button mouse
case "<C-LeftMouse>": case "<MiddleMouse>":
if (event.originalTarget.localName.toLowerCase() == "a") if (event.originalTarget.localName.toLowerCase() == "a")
{
vimperator.open(event.originalTarget.textContent, vimperator.NEW_BACKGROUND_TAB); vimperator.open(event.originalTarget.textContent, vimperator.NEW_BACKGROUND_TAB);
break; 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>": case "<S-LeftMouse>":
if (/^(end|more(-help)?)-prompt$/.test(event.target.id)) if (/^(end|more(-help)?)-prompt$/.test(event.target.id))
; // fall through ; // fall through