aboutsummaryrefslogtreecommitdiff
path: root/extract.c (follow)
Commit message (Collapse)AuthorAgeLines
* debug: rename assert() to xassert(), to avoid clashing with <assert.h>Craig Barnes2021-01-16-3/+3
|
* selection: combine enum selection_kind with selection_semanticDaniel Eklöf2021-01-06-6/+2
|
* extract: finish: increase ‘idx’ when pushing new data, for consistencyDaniel Eklöf2021-01-04-2/+2
| | | | | | | | | We don’t write anything more to the buffer after this, but this makes this code consistent with all other code that pushes new data to the buffer. This makes it easier to search, and validate, the ensure_size()+push-data pattern.
* extract: finish: fix bad assertion - ‘idx’ may be equal to ‘size’Daniel Eklöf2021-01-04-2/+5
| | | | | | ‘idx’ is where _new_ data should be pushed into the buffer. Thus it is perfectly valid for it to be equal to ‘size’ - it just means we need to allocate more space before pushing data to it.
* extract: only emit newlines if followed by non-empty cellsDaniel Eklöf2020-08-20-5/+11
| | | | Closes #97
* Convert most dynamic allocations to use functions from xmalloc.hCraig Barnes2020-08-08-0/+10
|
* config: add 'hide-when-typing'Daniel Eklöf2020-07-31-0/+1
| | | | | | When enabled, the mouse cursor is hidden when the user types in the terminal. It is un-hidden when the user moves the mouse, or when the window loses keyboard focus.
* extract: finish: allocate buffer before writing the terminatorDaniel Eklöf2020-07-16-18/+19
| | | | | When all cells were empty, we'll have written 0 bytes to the buffer and hence it will still be un-allocated (i.e. NULL).
* extract: extract_one() sets a fail flag that extract_finish() readsDaniel Eklöf2020-07-15-7/+19
| | | | | | This allows us to safely call extract_finish() when extract_one() failed, and we'll get the expected result; false, indicating extract_finish() failed.
* extract: extract_one: make arguments constDaniel Eklöf2020-07-15-2/+2
|
* selection: refactor: break out text extraction to a separate fileDaniel Eklöf2020-07-15-0/+163