Commits
- Commit:
6241aa26f34274ae8b9b7934c88d5686bcb2c7a2
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix tests for build out-of-tree
now `make distcheck' works as advertised
- Commit:
23a912c214e3f9a8bbb2bf03e65c2d3a538f869f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add test of parsing and deserialization of gophermaps
- Commit:
1bcb8303e1b913df31980ca332a5619424a72b01
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move load_page_from_str to telescope.c
I'd like to use parser{,_gophermap,_gemtext}.c in standalone testing
programs, and this function is getting in the way since it depends on
ui.c
- Commit:
fe84b7508f733106d346acf1b120951c78ad77a1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
switch the cache to the new parser_serialize API
- Commit:
069c9a92f36df9d307d734ffa8903035c7181129
- From:
- Omar Polo <op@omarpolo.com>
- Date:
parsers: add serialize function
Add a parser_serialize function and an optional function `serialize' for
parsers. The default implementation just prints the text line, which is
suitable for parser_textplain and parser_textpatch; gemtext and
gophermap uses their own specific unparse functions.
This is intended for an incoming cache refactoring: we'll cache the page
serialized in the correct format, not once it has been translated to
gemtext. This will allow in the future to provide commands such as
``save page to disk'' or interface with an on-disk cache.
- Commit:
5a21e0eb51554d72c1b6465c2b4afc8cdef5dcf1
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add fn pointer to the parser init function to struct parser
will come in handy in the future cache refactoring.
- Commit:
b96fa8fe23277bee0c42d55dae506449d83909bc
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use parser_init instead of directly calling the parser init fn
- Commit:
bf5b33f40e876afe41fd486ff5d3eb182dfaf046
- From:
- Omar Polo <op@omarpolo.com>
- Date:
correctly save scrolling position
Before we didn't save the scrolling position before a refresh
(nohist=1) and that's annoying. This saves the scrolling position
only in the correct case, which is when changing from a page to
another, expect when switching to TAB_LAZY off.
- Commit:
fb8dcd1c494b0339067ca13f5bfc8ac8a1a43114
- From:
- Omar Polo <op@omarpolo.com>
- Date:
move TAB_LAZY flipping from switch_to_tab in load_url
load_url needs to know when a tab passes from lazy to not lazy to
correctly saves the scrolling position (see follow-up commit.)
- Commit:
4aaf5de005720fd3086c249f6854b51a6c86ea92
- From:
- Omar Polo <op@omarpolo.com>
- Date:
typo in parse_session_line
without +4 strtonum sees top=X and cur=Y which are invalid numbers, so
the scroll position is lost.
- Commit:
8d39ecac31b149e6d285c931679c7463daebf273
- From:
- Omar Polo <op@omarpolo.com>
- Date:
sync changelog
- Commit:
638823f847d99e105ee6671fe1c51f8f048a0e48
- From:
- Omar Polo <op@omarpolo.com>
- Date:
don't reset scroll position if the cursor changed line
If the user managed to move the cursor before the page load, don't
restore the scroll position. This is to avoid unnecessary jumping and
causing possible confusion on the user.
- Commit:
e795e9355a607cbda3790e5c651c1a6f829e4326
- From:
- Omar Polo <op@omarpolo.com>
- Date:
save and restore scroll position
Save the offset to the first and current line of the buffers and restore
it when the page is loaded. This restores almost the exact viewport: we
save the offset of the *real* line in the document, but they get wrapped
before being displayed, so the actual restored position may be slightly
above from the original one (think of a long paragraph that gets wrapped
over multiple visual lines.) In practice, this isn't a drawback but
only an improvement over the current behaviour.
In the future we could save also the offset *inside* the line, to
restore the exact position, but that felt unnecessary for now.
Persisting the postion on the session file ensures that even when
re-opening telescope the scroll position is correct.
There are some very active pages, such as antenna or other aggregator,
where this feature doesn't really work well if you re-open the page
after a while, since new links are available, but otherwise is a god
sent!
See also github issue #1
- Commit:
8f1633da06463e8909dbf68a870aa64350f32a12
- From:
- Omar Polo <op@omarpolo.com>
- Date:
simplify parse_session_line
drop sendtab which is not that useful and send the tab to the ui
process directly in parse_session_line. It's easier to skip malformed
session lines too!
- Commit:
68b634ad2803674767d0a5f1b4cf4f47ee6a9a39
- From:
- Omar Polo <op@omarpolo.com>
- Date:
sync changelog