Commits
- Commit:
f853ec6f0c0569cf5bae15ce3e9d8bfc533b358b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
handle tab characters
tab characters have their width depending on the column they're in,
since they extend to the next multiple of 8. (citation needed?)
So, keep track of the column when considering the length (in columns)
of the text, so that we can render them properly.
In the future we might want to turn them into spaces (either at read
or render time) just to stay on the safe side in case not all
terminals/ncurses implementations use 8 columns.
- Commit:
2f0ffab47b34449e9e24a05e408e9d6983b24ba8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
prompt before opening the downloads
- Commit:
3d89457cdeba5041aa6f0c1f8640b91bcbb6ec51
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
code: add wrappers for common failure cases
Certain calls to well-known functions sometimes result in similar
error handling across the code base. Sometimes there's a need to
centralise the failure case.
Achieve this for common wrappers to often-used functions.
The transformation is achieved via coccinelle, commited with this patch.
Note that coccinelle can be told to ignore code blocks with comment
delimiters.
This transformation applies just to telescope's code, and not any of the
bundled depdencies in telescope (libgrapheme).
- Commit:
c1d27b0e114e6a65f7979971940df212f00bb2ae
- From:
- Omar Polo <op@omarpolo.com>
- Date:
untangle a bit buffers and parsers
Now buffers have a nicer interface, taking explicitly the buffer
where they push stuff, and the code that deals with buffers doesn't
need to peek into the parsers. The parsers now are 'pure' structs
without state attached to them, the state was moved to the buffer.
- Commit:
7b7a69f2aeeffb5436fd490f2020335b5bf9a121
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
update telescope to make use of mailcap
Change telescope to make use of mailcap entries.
Commands are no longer prompted for how to handle an unknown mime-type.
Commands are now executed via execvp(), and the mailcap handling assumes
this as part of its interface.
- Commit:
4e32d3a6c187dd9646ba4aa80a69082adf3b3c46
- From:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
ui: add capability to run external cmds
When telescope encounters a file type which it cannot display it prompts
the user whether they wish to save the file, or not.
This patch extends this idea -- if the file is saved, then the user is
prompted to run a command against that downloaded file.
This controllable via the 'external-cmd' setting. It defaults to
'xdg-open'.
This is based off work originally started by op@.
- Commit:
b59bcb53ccddc0a8f27813afbf127e54f554ae42
- From:
- Omar Polo <op@omarpolo.com>
- Date:
garbage collect `dequeue_first_download'
- Commit:
fd984e767a8e0e4978cfe072899282a8265a911e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop the `buffer' flag for enqueue_download
it's unused as write_buffer now writes a buffer to the disk.
- Commit:
f63b8f7342aefba6b3dac50d6790981987c8faa8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
merge the fs into the ui process
The previous separation between the fs and ui process wasn't that good.
The idea was to have a `ui' process tightly sandboxed, but it was a lie
actually. `ui' was one imsg away from making internet connections and
accessing data on the disk, so it wasn't really limited in (almost) any
way.
Furthermore, having to serialize data to/from the fs proc started to
become not really maneagable.
As a first step to fix this situation, join the fs and ui process.
- Commit:
868b3a8f52ea2f90a1965661798d977d307e3b38
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add write-buffer
saves a page to the disk. Also, changes the order of the downloads so
the new one is always at the top.
- Commit:
6219c17fe1ea063932a21f61ca5a1a1abb80017d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix prototype
- Commit:
84892515ec94204f7208e7492a31439f8c0f82e3
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use download_cols to wrap the text in the download buffer
download_lines is a very small value, for a normally sized terminal is
exactly 5. This was the cause behind the download pane glitch, 5 was
used as *column number* for the reflow.
Now, to be honest, the exact width passed to wrap_page is not
important. wrap_page will only wrap the size string, which we know is
less than or equal to FMT_SCALED_STRSIZE-1 (6). We could also
hardcode the value eventually, but using download_cols reads better.
- Commit:
32ca52749c9f9639a7d19a050cf15b61a076dd19
- From:
- Omar Polo <op@omarpolo.com>
- Date:
pass the correct pointer
- Commit:
15f22b81b8b42898205eb6de1bb4ddf860e5bdf9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
swap the fields in download lines
- Commit:
fcd99a0d4765b480ed9fa260b253770a85313a1e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
switch to our new struct download for the downloads
- Commit:
a1a63cf5f5a3265b01ba841b9aafc55121c3f5f5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
wrap download page
- Commit:
1577540cfba6ba170eb61e67601af3c8fde3b9e6
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add download and download.* line styles
- Commit:
3b5f459ef42c1d975ca5f15ed6402b5658f779f4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
add side window for downloads