Daniel Eklöf
761bf426dc
render: resize: no need to truncate selection anymore - it's being translated
2020-04-17 22:30:56 +02:00
Daniel Eklöf
7eb990c8b1
render: resize: need to translate selection coordinates
...
While it *looked* like the selection was working before, it really
wasn't.
When rendering, we're looking at the cells' attributes to determine
whether they have been selected or not.
When copying text however, we use the terminal's 'selection' state,
which consists of 'start' and 'end' coordinates.
These need to be translated when reflowing text.
2020-04-17 22:20:27 +02:00
Daniel Eklöf
5e2e59679b
grid: reflow: make tracking_points array 'const'
...
The elements aren't, and cannot be, const. But the array itself can,
and should be.
2020-04-17 22:19:59 +02:00
Daniel Eklöf
a9af8290ab
Merge branch 'translate-cursor-coords-when-reflowing'
2020-04-17 21:16:38 +02:00
Daniel Eklöf
5509fe514a
render: resize: no need to clear the selection - just truncate if necessary
2020-04-17 21:11:30 +02:00
Daniel Eklöf
ef52ed8a10
grid: reflow: caller may now pass a list of coordinates that should be translated
2020-04-17 21:04:32 +02:00
Daniel Eklöf
e5521ff79a
grid: reflow: generalize cursor coordinate translation
...
Define a list of "tracking points" - coordinates that should be
translated while reflowing.
Add the cursor coordinates to this list.
When a coordinate have been translated, it is removed from the
list. This means we don't have to create a copy of the 'cursor'
coordinate struct.
2020-04-17 21:00:37 +02:00
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