Commit graph

1867 commits

Author SHA1 Message Date
Daniel Eklöf
87fc0cfb85
changelog: cursor coordinates are now translated on resize 2020-04-17 20:49:09 +02:00
Daniel Eklöf
91a71b4147
grid: reflow: remove commented out code 2020-04-17 20:48:22 +02:00
Daniel Eklöf
aede474a52
grid: reflow: turn line-wrapping code into a macro 2020-04-17 20:46:08 +02:00
Daniel Eklöf
e37aa3b369
grid: reflow: don't randomly insert hard linebreaks
Not sure why I added this code; maybe to workaround issues caused by
the fact that the cursor position wasn't properly translated.
2020-04-17 20:33:08 +02:00
Daniel Eklöf
5546b40369
grid: grid_reflow() now translates cursor coordinates 2020-04-16 19:38:30 +02:00
Daniel Eklöf
89559d5466
grid: move 'cursor' state from terminal to grid
This way, the 'normal' and 'alt' grids have their own cursor state,
and we don't need to switch between them.
2020-04-16 18:51:14 +02:00
Daniel Eklöf
c96a0b3b3c
misc: replace all explicit zero-initializers with empty initializers 2020-04-13 12:03:11 +02:00
Daniel Eklöf
d67f437458
mbstate: fix compile warning on systems where mbstate_t isn't an integral
An empty initializer still ensures the entire object is
zero-initialized.
2020-04-13 11:58:38 +02:00
Daniel Eklöf
a6fc5f10fb
ci: alpine: add missing dependencies: pixman + libxkbcommon 2020-04-13 11:52:43 +02:00
Daniel Eklöf
27a205e90f
term: reset: plug memory leak
In reset, we allocated new rows for all the currently visible
lines. We did **not** however, free the 'old' rows.

Fix by not explicitly allocating new rows, but instead allocating
uninitialized rows when needed, and then explicitly erasing the row.

If there already was a row allocated, it is simply erased. If there
wasn't, the a new line is malloc:ed, and then erased.
2020-04-13 11:42:10 +02:00
Daniel Eklöf
3f35a40ff8
ci: initial FreeBSD build manifest 2020-04-12 18:33:27 +02:00
Daniel Eklöf
9a71f20de7
ci: alpine: wlroots isn't needed (or used, at all) 2020-04-12 18:33:07 +02:00
Daniel Eklöf
1776f8bf1e
Fix clang warnings
All are printf() formatter related. Even if a variable is e.g. a
'short', when used in an expression like '<variable> - 1' it is
promoted to an 'int'.

Closes #16
2020-04-12 18:20:52 +02:00
Daniel Eklöf
e997ec7e1d
ci: move sr.ht's .build.yml to .builds/alpine.yml 2020-04-11 16:33:07 +02:00
Daniel Eklöf
1e8220d83a
themes: add a couple of color themes
Foot doesn't really support themes, but with this, users can at least
copy-paste from a couple of predefined themes into their footrc.
2020-04-10 21:06:05 +02:00
Daniel Eklöf
00dbe12e41
input: slow trackpad scrolling now eventually scroll a line
Before, we converted each axis event's scroll amount to an integer and
scrolled that many lines.

However, axis events are speed sensitive - very slow scrolling will
result in events with a scroll amount that is < 1.0.

For us, this meant we never scrolled a single line. You could slow
scroll all day if you wanted, and still we would never scroll a single
line.

Fix this by aggregating the scroll amount from axis events until the
scroll amount is > 1.0, and then scroll.
2020-04-10 18:43:29 +02:00
Daniel Eklöf
03bdb40bd9
render: don't dim so much when in search mode 2020-04-10 17:51:33 +02:00
Daniel Eklöf
23b2eed409
render: strip 'pixman' from color function names 2020-04-09 13:41:16 +02:00
Daniel Eklöf
29d4722de5
render: remove unused functions 2020-04-09 13:35:35 +02:00
Daniel Eklöf
1f264b165d
config: use an unsigned constant, since we're shifting 31 bits 2020-04-09 13:35:02 +02:00
Daniel Eklöf
7a82bcf7a5
keymap: remove trailing whitespaces 2020-04-08 17:54:52 +02:00
Daniel Eklöf
a145f7b32a
completions: zsh: foot: default geometry is 700x500, not 700x50 2020-04-08 17:45:59 +02:00
Daniel Eklöf
7d76c5aca1
changelog: alt+return now emits ESC \r 2020-04-08 17:39:54 +02:00
Daniel Eklöf
762ed04637
keymap: return: all Alt+<mod> now emits \e\r 2020-04-08 17:33:36 +02:00
Daniel Eklöf
b60c9d0b40
keymap: \t -> spaces 2020-04-08 17:31:21 +02:00
Daniel Eklöf
2e11517c04
Merge branch 'mchackorg/foot-alt-return' 2020-04-08 17:27:08 +02:00
Daniel Eklöf
5ee55a7077
terminfo: foot: setaf/b: use colon-separated variant 2020-04-08 17:26:23 +02:00
Daniel Eklöf
4ba42ee7ab
terminfo: foot-direct: setaf/b: set color space to '2' (RGB) 2020-04-08 17:25:52 +02:00
Daniel Eklöf
f4e6d2e3ee
README: describe how to report bugs 2020-04-04 20:54:54 +02:00
Daniel Eklöf
992ceed7e0
doc: foot.1: list what a bug report should contain 2020-04-04 20:54:28 +02:00
Daniel Eklöf
1a08d94da1
doc: foot.1: add link to issue reporting 2020-04-04 20:36:46 +02:00
Daniel Eklöf
0f663cb4d0
readme: summary: add 'lightweight' 2020-04-04 14:53:05 +02:00
Daniel Eklöf
a658fee6b5
readme: remove the 'non-features' and 'what doesn't work' sections 2020-04-04 14:43:38 +02:00
Daniel Eklöf
f54657569b
meson: don't set -fno-stack-protector
Disabling the stack protection is generally bad, and I can't measure
any performance drops with it enabled.
2020-04-04 14:41:43 +02:00
Daniel Eklöf
6d7c686a3c
Merge branch 'osc4-multi-parameter' 2020-04-04 14:32:02 +02:00
Daniel Eklöf
5dc7608e3f
changelog: osc 4 multiple 'c;spec' pairs 2020-04-04 14:31:46 +02:00
Daniel Eklöf
5b67e97fc2
osc 104: handle multiple indices the same way we do in OSC 4 - use strtok() 2020-04-04 14:30:50 +02:00
Daniel Eklöf
ae1b235eaa
osc: 4: handle multiple idx;spec pairs 2020-04-04 14:27:44 +02:00
Daniel Eklöf
10330c2a9d
readme: tweak presentation of OSC 555 2020-04-04 13:58:29 +02:00
Daniel Eklöf
34b4d55c82
readme: markup of OSC sequences 2020-04-04 13:58:05 +02:00
Daniel Eklöf
5113fa7375
readme: document implemented OSC sequences 2020-04-04 13:56:55 +02:00
Daniel Eklöf
f0fbfe8e89
Merge branch 'right-mouse-extend-selection' 2020-04-04 12:10:43 +02:00
Daniel Eklöf
934452e1d5
doc: foot.1: right mouse button extends current selection 2020-04-04 12:09:56 +02:00
Daniel Eklöf
6ed8dc0dda
readme: right mouse button extends current selection 2020-04-04 12:09:30 +02:00
Daniel Eklöf
51718f2e9c
changelog: right mouse button extends current selection 2020-04-04 12:08:46 +02:00
Daniel Eklöf
035eccbb13
selection: extend: new row must be offsetted with the current view offset 2020-04-04 12:05:40 +02:00
Daniel Eklöf
fac4b73107
input: right mouse click extends the current selection 2020-04-04 12:02:07 +02:00
Daniel Eklöf
aa01521ff6
selection: add selection_extend()
This function extends an existing selection in the following way:

If the extension point is *before* the upper boundary of the current
selection, extend the selection upwards.

If the extension point is *after* the bottom boundary of the current
selection, extend the selection downwards.

If the extension point is *inside* the current selection, shrink the
selection such that the new size is maximized. This means we move the
*closest* start/end point from in the current selection.
2020-04-04 11:59:15 +02:00
Daniel Eklöf
2344f153d9
input: hardcoded left mouse button handler requires click-count <= 3
This enables user mappings for the left mouse button with click count
> 3

I.e. it is now possible to create custom quad-click mappings (except
we don't yet support this in footrc).
2020-04-04 11:57:33 +02:00
Daniel Eklöf
210c0ee5cd
input: only cancel selection on left mouse button clicks 2020-04-04 11:57:08 +02:00