[Conkeror] [PATCH] find-url with blank url reloads buffer.

David Kettler David.Kettler at dsto.defence.gov.au
Mon Oct 27 17:24:06 PDT 2008


A blank url now defaults to the url of the current buffer.  This means
that "g RET" will reload the current buffer (which is useful for
fingers trained to press "g" in gnus).  Also "C-u g RET" will duplicate
the current buffer.

There is no new functionality, but keystrokes which were not useful
now do something sensible.
---

I'm not sure if I.buffer.description is the correct place to grab the
current url.

 modules/content-buffer.js |    3 +--
 modules/element.js        |    2 ++
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/content-buffer.js b/modules/content-buffer.js
index 7726a06..051acee 100644
--- a/modules/content-buffer.js
+++ b/modules/content-buffer.js
@@ -309,8 +309,7 @@ minibuffer.prototype.read_url = function () {
         $auto_complete = "url",
         $select,
         $match_required = false);
-    if (result == "") // well-formedness check. (could be better!)
-        throw ("invalid url or webjump (\""+ result +"\")");
+    // todo: well-formedness check
     yield co_return(result);
 };
 /*
diff --git a/modules/element.js b/modules/element.js
index 6aed43b..916b898 100644
--- a/modules/element.js
+++ b/modules/element.js
@@ -367,6 +367,8 @@ function follow (I, target) {
     // for this check, because FOLLOW_DEFAULT could signify new buffer
     // or new window.
     check_buffer (I.buffer, content_buffer);
+    if (I.browser_object == browser_object_url && element.length == 0)
+        element = I.buffer.description;
     browser_object_follow(I.buffer, target, element);
 }
 
-- 


-- 
IMPORTANT: This email remains the property of the Australian Defence
Organisation and is subject to the jurisdiction of section 70 of the
CRIMES ACT 1914. If you have received this email in error, you are
requested to contact the sender and delete the email.



More information about the Conkeror mailing list