Commit graph

650 commits

Author SHA1 Message Date
Daniel Eklöf
2707cf0fc4
vt: implement 'insert mode' 2019-08-30 22:08:37 +02:00
Daniel Eklöf
f4291690ee
csi: CSI h isn't a valid sequence - it needs a parameter
And, 'insert mode' isn't activated with \e[h, but with
\e[4h.
2019-08-30 22:01:05 +02:00
Daniel Eklöf
2e9349c4c4
vt: remove unneeded include 2019-08-30 21:43:50 +02:00
Daniel Eklöf
77f6c126f5
generate-alt-random-writes: generate streaks of characters 2019-08-30 21:37:51 +02:00
Daniel Eklöf
37d941f57a
input: take scale into account when converting mouse coords to row/col 2019-08-30 21:31:14 +02:00
Daniel Eklöf
05888b4706
input: bug: account for margins when converting mouse coords to row/col 2019-08-30 21:30:27 +02:00
Daniel Eklöf
7c4c41fbae
render: search box: use colors from the color table
Use the 'yellow' color from the 'regular' range of colors (SGR 33) for
background when we have a match, or 'red' from the 'regular' range of
colors (SGR 31) when we don't have a match.

Foreground uses the 'black' color from the regular range of
colors (SGR 30).
2019-08-30 21:01:13 +02:00
Daniel Eklöf
e2aeb7e515
search: map ctrl+b/f to move cursor single character backward/forward 2019-08-30 20:55:45 +02:00
Daniel Eklöf
d87b791d81
man: document keyboard + mouse shortcuts 2019-08-30 20:26:29 +02:00
Daniel Eklöf
1c0265074e
README: put -> copy 2019-08-30 20:26:20 +02:00
Daniel Eklöf
5752aaca0c
README: document ctrl+s while doing a scrollback search 2019-08-30 20:18:12 +02:00
Daniel Eklöf
e673bd4ab0
Merge branch 'scrollback-search' 2019-08-30 20:16:12 +02:00
Daniel Eklöf
f24a40a391
search: ctrl+s searches forward 2019-08-30 20:15:36 +02:00
Daniel Eklöf
556bf95b28
search: make search-direction configurable 2019-08-30 20:15:12 +02:00
Daniel Eklöf
42714c51a9
search: fix distance to prev word calculation when final cursor was 0 2019-08-30 19:42:48 +02:00
Daniel Eklöf
e8d187e4f3
render: draw (cursor) bar using the same thickness as underlines 2019-08-30 19:42:33 +02:00
Daniel Eklöf
0fceed6f00
search: implement move cursor word backward/forward 2019-08-30 19:37:18 +02:00
Daniel Eklöf
64460c5abe
search: implement delete word backward/forward 2019-08-30 19:37:06 +02:00
Daniel Eklöf
61318d068e
search: utility functions distance_{next,prev}_word()
These functions calculate the distance from the current cursor to the
next/previous word.
2019-08-30 19:36:37 +02:00
Daniel Eklöf
fcb0e05009
render: search box: fix glyph spacing
We're using the same font as in the terminal, so use the same glyph
spacing.
2019-08-30 19:35:47 +02:00
Daniel Eklöf
9f7ea6292e
main: use a timer FD to delay render refresh after client data
This ensures we never wait *longer* than 1ms (previously, we could end
up doing multiple polls, each with a timeout value of 1ms - thereby
potentially delaying the refresh indefinitely).
2019-08-30 17:57:46 +02:00
Daniel Eklöf
fb018eb64e
main: render_resize() scales the width and height
Thus, when we call render_resize() with *old* with/height values, we
must scale them back to their original values.

This fixes an issue where, for example, moving a window between
outputs with different scales caused the window to keep growing.
2019-08-30 17:56:23 +02:00
Daniel Eklöf
47da5b4086
main: request server-side decorations 2019-08-30 17:55:45 +02:00
Daniel Eklöf
f2fda437e7
README: mention that the PKGBUILD requires a running wayland session 2019-08-29 23:15:13 +02:00
Daniel Eklöf
0c8e5d39b0
README: clarify _how_ and _where_ makepkg is supposed to be run 2019-08-29 23:13:56 +02:00
Daniel Eklöf
0c0deef4f0
README: re-arrange: put requirements+installation last 2019-08-29 23:12:39 +02:00
Daniel Eklöf
8fa6b5fa2d
README: add an 'installation' section 2019-08-29 23:11:11 +02:00
Daniel Eklöf
f43fb5f13f
README: hopefully fix nested lists 2019-08-29 23:05:38 +02:00
Daniel Eklöf
9bdc3a8438
README: add index 2019-08-29 23:05:19 +02:00
Daniel Eklöf
72d918da92
README: more emphasis 2019-08-29 23:02:18 +02:00
Daniel Eklöf
da9b2d12e7
README: re-write font section 2019-08-29 23:00:49 +02:00
Daniel Eklöf
a6eec9a6a6
README: add a feature list 2019-08-29 22:55:49 +02:00
Daniel Eklöf
c8494e7efa
README: use <kbd> for remaining keyboard key combos 2019-08-29 22:50:35 +02:00
Daniel Eklöf
5c47fac893
README: upper case initial letters 2019-08-29 22:49:33 +02:00
Daniel Eklöf
ff7566c46d
README: use poor man's markdown version of definition lists 2019-08-29 22:48:25 +02:00
Daniel Eklöf
63da83a9cc
README: test indented paragraph in list 2019-08-29 22:46:26 +02:00
Daniel Eklöf
03534a327c
README: use <kbd/> for keyboard key combos 2019-08-29 22:44:06 +02:00
Daniel Eklöf
425d221e02
README: try <kbd> markup 2019-08-29 22:40:44 +02:00
Daniel Eklöf
db291573b7
Revert "search: for now, reset search match state whenever the buffer changes"
This reverts commit 9c6ece747e.
2019-08-29 21:16:25 +02:00
Daniel Eklöf
9c6ece747e
search: for now, reset search match state whenever the buffer changes 2019-08-29 21:10:13 +02:00
Daniel Eklöf
4c9e7d0c19
search: call render_search_box() from search_inptu() 2019-08-29 21:09:49 +02:00
Daniel Eklöf
4d0ea11454
search: add basic cursor navigation support 2019-08-29 21:05:18 +02:00
Daniel Eklöf
10649178f8
search: insert new characters at cursor, not at the end of the buffer 2019-08-29 21:03:46 +02:00
Daniel Eklöf
6003b87813
search: search_cancel: reset cursor position 2019-08-29 21:03:16 +02:00
Daniel Eklöf
2ca7400cc6
render: render_search_box: draw cursor as a bar 2019-08-29 21:03:00 +02:00
Daniel Eklöf
27da0d7f28
term: add a 'cursor' (position) to the search state 2019-08-29 21:02:35 +02:00
Daniel Eklöf
bffa1f05ac
render: draw_strikeout: use font_baseline() for baseline calculation 2019-08-29 20:42:57 +02:00
Daniel Eklöf
1f98c8f787
render: draw_underline: use font_baseline() for baseline calculation 2019-08-29 20:42:45 +02:00
Daniel Eklöf
6e5688d7da
render: draw_bar: don't assume height == ascent+descent
Instead, draw a bar that is ascent+descent tall, positioned around the
baseline such that it starts at the ascent and ends at the descent.
2019-08-29 20:41:40 +02:00
Daniel Eklöf
013cf61ffb
render: add font_baseline() - calculates the y-coordinate for the baseline
The old baseline calculation was copy-pasted to a couple of places,
and also assumed that the font's height was equal to ascent+descent.

While this is typically true, it isn't necessarily so.

Now, we assume that height >= ascent+descent, and then position the
baseline in "center" (but adjusted for the descent).
2019-08-29 20:39:22 +02:00