Daniel Eklöf
c2be3408ed
config; {horizontal,vertical}-letter-offsets may be negative
2021-01-11 09:31:07 +01:00
Daniel Eklöf
70cfcf11fb
config: letter-spacing: make this a relative value
...
0, the default, means no additional spacing; the cell width is defined
by the font metrics.
A positive value *adds* to the width from the font metrics, while a
negative value *subtracts*.
2021-01-11 09:31:06 +01:00
Daniel Eklöf
389570b274
box-drawing: compensate for non-zero {horizontal,vertical}-letter-offsets
...
Box drawing characters should always cover the entire cell. No more,
no less.
2021-01-11 09:31:06 +01:00
Daniel Eklöf
3eba48d74b
render: offset all glyphs with {horizontal,vertical}-letter-offset
2021-01-11 09:31:06 +01:00
Daniel Eklöf
a0c359c24e
term: set_fonts: use custom line-height+letter-spacing, if set
...
If the user has configured a custom line-height and/or letter-spacing,
use that instead of the font metrics.
2021-01-11 09:31:06 +01:00
Daniel Eklöf
428b5ef27c
foot.ini: add new options: line-height, letter-spacing and *-letter-offset
2021-01-11 09:31:06 +01:00
Daniel Eklöf
f9c9dd2432
config: add line-height, letter-spacing, {horizontal,vertical}-letter-offset
2021-01-11 09:31:05 +01:00
Daniel Eklöf
2177bacd6f
Merge branch 'fish-completions'
...
Closes #11
2021-01-08 21:33:22 +01:00
FollieHiyuki
bb1b8bc7ca
Add fish completion
2021-01-08 20:37:33 +03:00
Daniel Eklöf
ba48109a9b
Merge branch 'center-grid-content'
...
Closes #273
2021-01-07 12:08:31 +01:00
Daniel Eklöf
124759bd2c
render: sixel: fix assertion: x/y coords may be outside visible area
...
But when they are, width/height must be 0.
2021-01-06 16:57:07 +01:00
Daniel Eklöf
e14c592f39
config: add optional ‘center’ argument to ‘pad’
...
When set, the grid contents is centered in the window. I.e. the
left/right and top/bottom margins are equal (+- 1px).
This causes the content to “jump” while doing an interactive resize,
but may still be preferred in e.g. a tiling WM.
Closes #273
2021-01-06 11:17:29 +01:00
Daniel Eklöf
21dbb44a30
selection: extend-block: update pivot point and selection direction
2021-01-06 11:14:11 +01:00
Daniel Eklöf
3a34eda8cc
selection: extend: don’t copy to primary - it is done when RMB is released
2021-01-06 11:13:52 +01:00
Daniel Eklöf
b09197ea07
selection: extend: re-calculate pivot point
2021-01-06 11:07:19 +01:00
Daniel Eklöf
f236dc7701
selection: break out pivot point adjustment for character-wise selections
2021-01-06 10:54:53 +01:00
Daniel Eklöf
3a9172342f
selection: combine enum selection_kind with selection_semantic
2021-01-06 10:53:27 +01:00
Daniel Eklöf
fcca3d3e55
Merge branch 'extend-selection-by-word'
...
Closes #267
2021-01-04 20:27:57 +01:00
Daniel Eklöf
dc676f96ce
render: codespell: accomodate -> accommodate
2021-01-04 19:49:24 +01:00
Daniel Eklöf
fd5d68c819
extract: finish: increase ‘idx’ when pushing new data, for consistency
...
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.
2021-01-04 19:48:44 +01:00
Daniel Eklöf
07078da0f0
extract: finish: fix bad assertion - ‘idx’ may be equal to ‘size’
...
‘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.
2021-01-04 19:48:44 +01:00
Daniel Eklöf
4849e8f874
selection: update: line-wraps are ok while moving pivot start/end point
...
This fixes an assertion triggered when selecting the upper left cell
and dragging down.
We would end up trying to decrement the pivot end point, hitting an
assertion that only is valid while skipping spacers.
Remove the assertion, and allow pivot points to be moved across line
wraps, but take care not to move outside the visible screen area.
2021-01-04 19:48:44 +01:00
Daniel Eklöf
56f6e450b0
selection: update: get start-row pointer *after* modifying the start row index
2021-01-04 19:48:43 +01:00
Daniel Eklöf
fb9a95494d
selection: update: simplify: multi-column chars don’t span line-wraps
2021-01-04 19:48:43 +01:00
Daniel Eklöf
2b195d2cc3
selection: wrap pivot_{start,end}->row before accessing grid row array
2021-01-04 19:48:43 +01:00
Daniel Eklöf
8113d2205d
selection: cancel: reset pivot coordinates
2021-01-04 19:48:43 +01:00
Daniel Eklöf
683f63c929
selection: update: find_word_boundary_{left,right}: coordinates are screen local
2021-01-04 19:48:43 +01:00
Daniel Eklöf
c851aae9d6
selection: find_word_boundary_{left,right}: try to make the code more readable
2021-01-04 19:48:42 +01:00
Daniel Eklöf
3863a61ba6
selection: find_word_boundary_{left,right}: handle multi-column characters
2021-01-04 19:48:42 +01:00
Daniel Eklöf
b22091a8c9
selection: find_word_boundary{left,right}: what we match depends on initial character
...
If the initial character is a space, find the next non-space
character.
If the initial character is a delimiter, find the next non-delimiter
character (space, or word character).
If the initial character is neither (i.e, it is a word character),
find the next non-word character.
2021-01-04 19:48:42 +01:00
Daniel Eklöf
2fd7b2fbd4
selection: allow selections to pivot around a range instead of a point
...
Extend selection pivoting to allow selections to pivot around a
range.
Use this in word- and row-based selections to pivot around the initial
word/row that was selected.
This mimics the behavior of at least urxvt and xterm.
2021-01-04 19:48:42 +01:00
Daniel Eklöf
c821914e67
selection: find_word_boundary{left,right}: handle composed characters
2021-01-04 19:48:41 +01:00
Daniel Eklöf
736ff0421c
selection: find_word_boundary_{left,right}: treat spacers as word chars
2021-01-04 19:48:41 +01:00
Daniel Eklöf
3afc5a723e
selection: use selection_start() to initialize word/row-based selection
...
This removes the selection_mark_word() and selection_mark_row()
functions. To start a word/row-based selection, use selection_start()
with SELECTION_SEMANTIC_{WORD,ROW}
2021-01-04 19:48:41 +01:00
Daniel Eklöf
3dd6b7e4ef
selection: don’t finalize selection when starting a word/row-based selection
2021-01-04 19:48:41 +01:00
Daniel Eklöf
bef69cb961
selection: remember whether word-wise selection uses spaces only for delimiters
2021-01-04 19:48:41 +01:00
Daniel Eklöf
a1b52ee4a0
changelog: double- or triple clicking then dragging extends word- or line-wise
2021-01-04 19:48:40 +01:00
Daniel Eklöf
55ecf29a36
selection: wip: update selection row-wise when initial selection was by row
2021-01-04 19:48:40 +01:00
Daniel Eklöf
30de262d29
selection: wip: update selection word-wise when initial selection was by word
2021-01-04 19:48:26 +01:00
Daniel Eklöf
482690e5fb
render: draw combining characters on top of colored bitmap glyphs (emoji)
2021-01-04 18:32:55 +01:00
Daniel Eklöf
21c1d9739b
input: don’t try to close an invalid FD
2021-01-04 18:32:22 +01:00
Daniel Eklöf
9d8ca321d6
input: don’t assert when receiving a button release without a press event
2021-01-04 18:32:00 +01:00
Daniel Eklöf
b4d7a60864
Merge branch 'hex2nibble'
2021-01-04 08:32:31 +01:00
Daniel Eklöf
07f000fa45
Merge branch 'blank-before-trailing-comment'
...
Closes #270
2021-01-04 08:30:40 +01:00
Craig Barnes
b9a7cbf21d
uri: rename nibbletohex() function to hex2nibble()
...
It converts a hex digit to a nibble, not the other way around.
2021-01-04 05:31:19 +00:00
Craig Barnes
d30414b3a3
uri: use nibble2hex() instead of isxdigit(3) to check valid hex digits
2021-01-04 05:25:14 +00:00
Peter Colberg
49ec4c79a7
Add myself to Contributors
2021-01-03 15:49:24 -05:00
Peter Colberg
afc343d528
Require trailing comment to be preceded by a space or tab
...
Fixes `word-delimiters` option to not ignore `#` and subsequent characters.
Closes #270
2021-01-03 14:08:25 -05:00
Daniel Eklöf
e2b3ef63b9
Merge branch 'macros'
2021-01-03 12:19:11 +01:00
Craig Barnes
39b2e46e72
Use wrappers from macros.h instead of bare GCC attributes/pragmas
2021-01-03 08:56:47 +00:00