about summary refs log tree commit diff stats
path: root/wip/tab-compl.sh
diff options
context:
space:
mode:
authorCase Duckworth2020-06-01 14:58:51 -0500
committerCase Duckworth2020-06-01 14:58:51 -0500
commit228c930ffd2697cfbed0aecf8f25ffcd58733cde (patch)
tree8f84b169b092c399287b03fa6457405a843904ae /wip/tab-compl.sh
parentAccept but ignore pre lines with alt text (diff)
downloadbollux-228c930ffd2697cfbed0aecf8f25ffcd58733cde.tar.gz
bollux-228c930ffd2697cfbed0aecf8f25ffcd58733cde.zip
Add rudimentary history support.
This commit adds `history_init`, `history_append`, `history_back`, and
`history_forward` functions.

The history is implemented as an array, HISTORY, which is appended to
with history_append when pages are visited, and a pointer, HN, which
points to the current position in the array.  When history_back is
called, it moves the pointer back 2 and calls blastoff to the URL there.
When history_forward is called, it does not move the pointer and
blastsoff to the URL.  Why back and forward basically have an off-by-one
error is beyond me at this time.

ISSUES:
- if the user goes back then forward, the history is not rewritten for
later URLs. for example, if the history is

	1.gmi	2.gmi	3.gmi*

where the * indicates the current history position, when the user goes
back 2, it looks like this:

	1.gmi*	2.gmi	3.gmi

if the user then navigates to another page:

	1.gmi	4.gmi*	3.gmi

3.gmi is still in the history, so the user can go forward from 4.  This
is unexpected as far as every other client that I know of goes.
Diffstat (limited to 'wip/tab-compl.sh')
0 files changed, 0 insertions, 0 deletions