From e23fa780cf2fff7146efcd64b2806ce428858b80 Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 22 Sep 2024 13:14:36 +0200 Subject: pager: improve hover text handling * align status truncating behavior with w3m (not exactly, clipping is still different, but this should be fine for now) * add "su" for "show last alert" - w3m's solution here is to scroll one char at a time with "u", but that's extremely annoying to use. We already have a line editor that can navigate lines, so reuse that instead. * fix peekCursor showing empty text * update todo --- doc/api.md | 5 +++++ doc/config.md | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/api.md b/doc/api.md index 004b52af..ec41f390 100644 --- a/doc/api.md +++ b/doc/api.md @@ -222,6 +222,11 @@ calls allow cycling through the two. (i.e. by default, press u once -> title, press again -> URL) + +`showFullAlert()` +Show the last alert inside the line editor. + + `ask(prompt)` Ask the user for confirmation. Returns a promise which resolves to a diff --git a/doc/config.md b/doc/config.md index d4253b4e..13afec04 100644 --- a/doc/config.md +++ b/doc/config.md @@ -484,7 +484,7 @@ images. sixel-colors -"auto" / 3..65535 +"auto" / 2..65535 Only applies when `display.image-mode="sixel"`. Setting a number overrides the number of sixel color registers reported by the terminal, while "auto" leaves color detection to Chawan.
@@ -888,16 +888,19 @@ Examples: + + + + + + + + + + + + + @@ -969,33 +983,39 @@ opened from, even if e.g. the user returns and opens another page "in between". + + + + + + + + + + + + + + + + -- cgit
Default key Name Function
q `cmd.pager.quit` Exit the browser.
C-z `cmd.pager.suspend` Temporarily suspend the browser
Note: this also suspends e.g. buffer processes or CGI scripts. So if you are @@ -905,56 +908,67 @@ downloading something, that will be delayed until you restart the process.
C-l `cmd.pager.load` Open the current address in the URL bar.
C-k `cmd.pager.webSearch` Open the URL bar with an arbitrary search engine. At the moment, this is DuckDuckGo Lite, but this may change in the future.
M-u `cmd.pager.dupeBuffer` Duplicate the current buffer by loading its source to a new buffer.
U `cmd.pager.reloadBuffer` Open a new buffer with the current buffer's URL, replacing the current buffer.
C-g `cmd.pager.lineInfo` Display information about the current line on the status line.
\ `cmd.pager.toggleSource` If viewing an HTML buffer, open a new buffer with its source. Otherwise, open the current buffer's contents as HTML.
D `cmd.pager.discardBuffer` Discard the current buffer, and move back to the previous/next buffer depending on what the previously viewed buffer was.
d,, d. `cmd.pager.discardBufferPrev`, `cmd.pager.discardBufferNext` Discard the current buffer, and move back to the previous/next buffer, or open the link under the cursor.
M-d `cmd.pager.discardTree` Discard all child buffers of the current buffer.
., ,, M-,, M-., +M-/ `cmd.pager.nextBuffer`, `cmd.pager.prevBuffer`, `cmd.pager.prevSiblingBuffer`, `cmd.pager.nextSiblingBufer`, `cmd.pager.parentBuffer`
M-c `cmd.pager.enterCommand` Directly enter a JavaScript command. Note that this interacts with the pager, not the website being displayed.
None `cmd.pager.searchForward`, `cmd.pager.searchBackward` Search for a string in the current buffer, forwards or backwards.
/, ? `cmd.pager.isearchForward`, `cmd.pager.searchBackward` Incremental-search for a string, highlighting the first result, forwards or backwards.
n, N `cmd.pager.searchNext`, `cmd.pager.searchPrev` Jump to the nth (or if unspecified, first) next/previous search result.
c `cmd.pager.peek` Display a message of the current buffer's URL on the status line.
u `cmd.pager.peekCursor` Display a message of the URL or title under the cursor on the status line. Multiple calls allow cycling through the two. (i.e. by default, press u once -> @@ -1003,21 +1023,32 @@ title, press again -> URL)
su`cmd.pager.showFullAlert`Show the last alert inside the line editor. You can also view previous +ones using C-p or C-n.
M-y `cmd.pager.copyURL` Copy the current buffer's URL to the system clipboard.
yu `cmd.pager.copyCursorLink` Copy the link under the cursor to the system clipboard.
yI `cmd.pager.copyCursorImage` Copy the URL of the image under the cursor to the system clipboard.
M-p `cmd.pager.gotoClipboardURL` Go to the URL currently on the clipboard.