From 074e2089d909e4f7ef85df89698875ec2b8935c3 Mon Sep 17 00:00:00 2001 From: bptato Date: Wed, 28 Feb 2024 21:48:44 +0100 Subject: pager: improve URL loading procs Split up load into loadSubmit, gotoURL: loadSubmit is a replacement for load(s + '\n'), and gotoURL is a load that does no URL expansion. Also, fix a bug where load("\n") would crash the browser. --- doc/config.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'doc/config.md') diff --git a/doc/config.md b/doc/config.md index e0208e16..64ed6a44 100644 --- a/doc/config.md +++ b/doc/config.md @@ -879,12 +879,28 @@ from the document's last line. `pager.load(url)` -Go to the specified URL. Opens a prompt with the current URL when no -parameters are specified; otherwise, the string passed is displayed in -the prompt. If this string ends with a newline +Put the specified address into the URL bar, and optionally load it.
+Note that this performs auto-expansion of URLs, so Chawan will expand any +matching omni-rules (e.g. search), try to open schemeless URLs with the default +scheme/local files, etc.
+Opens a prompt with the current URL when no parameters are specified; otherwise, +the string passed is displayed in the prompt. If this string ends with a newline (e.g. `pager.load("about:chawan\n")`), the URL is loaded directly. + +`pager.loadSubmit(url)` +Act as if `url` had been input into the address bar.
+Same as `pager.load(url + "\n")`. + + + +`pager.gotoURL(url)` +Go to the specified URL immediately (without a prompt). This differs from +`load` and `loadSubmit` in that it *does not* try to correct the URL.
+Use this for loading automatically retrieved (i.e. non-user-provided) URLs. + + `pager.dupeBuffer()` Duplicate the current buffer by loading its source to a new buffer. -- cgit 1.4.1-2-gfad0