Commit graph

252 commits

Author SHA1 Message Date
Daniel Eklöf
cdcdfe527c
sixel: fix sheared image when image crosses scrollback wrap-around
When a sixel image crosses the scrollback wrap-around, it is split up
into (at least) two pieces.

We use cursor->point.col for all pieces’ x-coordinate. This caused the
final image to appear sheared, since we do a carriage-return (after a
number of linefeeds) after each piece - this causes the cursor’s
position to be reset to the left margin.

The solution is simple; remember the cursor’s initial x-coordinate,
and use that to position all image pieces.

Closes #151.
2020-10-11 19:25:18 +02:00
Daniel Eklöf
7a7ba599c3
sixel: overwrite-by-rectangle expects ‘width’ to not exceed screen
This fixes a crash when the emitted sixel extends beyond the right
margin. The crash only happens when there are other sixel images
already emitted.

Fixes part of #151
2020-10-11 19:25:16 +02:00
Daniel Eklöf
a53e8c2866
render: apply opacity correctly when in reverse video mode 2020-10-11 19:24:50 +02:00
Daniel Eklöf
852fc049c8
config: ignore key/value pairs following an invalid section name
When we detected an invalid section name, we correctly logged this and
warned the user.

However, the internal state machine now had an invalid section enum
value. This caused a crash when the next key/value pair was to be
parsed and we tried to lookup which parser function to call.

Closes #159.
2020-10-11 19:24:08 +02:00
Daniel Eklöf
3c057fb600
changelog: trackpad scrolling: ‘multiplier’ is in the ‘scrollback’ section 2020-10-11 19:23:35 +02:00
Daniel Eklöf
aa3fcc1251
changelog: multiplier: the option belongs to the ‘scrollback’ section 2020-10-11 19:23:33 +02:00
Daniel Eklöf
8181113e3c
changelog: multiplier default value changed from 1.0 -> 3.0 2020-10-11 19:23:31 +02:00
Daniel Eklöf
1bc9c1c230
changelog: reword trackpad scrolling speed entry 2020-10-11 19:23:27 +02:00
Daniel Eklöf
8e04b08615
input: trackpad scroll: correctly convert pixel movements to line movements
Trackpad scroll movements are in pixels. Foot previously “translated”
these directly to line movements (i.e. a one pixel scroll event was
translated into a one line scroll).

Now we use the line height of the terminal and correctly convert
pixels to lines.

This makes the trackpad scroll speed in foot consistent with the
scroll speed in e.g. Alacritty and Kitty.
2020-10-11 19:23:25 +02:00
Daniel Eklöf
b12ce3d7d7
grid: reflow: retain scrollback position
Closes #142
2020-10-11 19:23:09 +02:00
Daniel Eklöf
acd1d6a4a3
changelog: fixed color flashes with OSC 4,10,11 2020-10-11 19:23:06 +02:00
Daniel Eklöf
59ca98f989
input: mouse: match binding if binding’s click count is *less*
Allow a mouse binding to match even if its click count is less than
the actual click count.

If there are multiple bindings that match, use the one with the
highest click count (that less than, or equal to the actual click
count).

Closes #146
2020-10-11 19:22:47 +02:00
Daniel Eklöf
7bb756ccbc
changelog: add new ‘unreleased’ section 2020-10-11 19:22:21 +02:00
Daniel Eklöf
377a721b08
changelog: prepare for 1.5.0 2020-09-18 21:22:59 +02:00
Daniel Eklöf
70cf0966a5
changelog: add cherti to contributors 2020-09-18 21:22:27 +02:00
Daniel Eklöf
c244ff522e
Revert "changelog: add cherti to contributors"
This reverts commit 8f3692f9a6.
2020-09-18 21:22:10 +02:00
Daniel Eklöf
8f3692f9a6
changelog: add cherti to contributors 2020-09-18 21:20:12 +02:00
Daniel Eklöf
3e9186a042
changelog: mouse events -> mouse scroll events 2020-09-15 19:29:38 +02:00
Daniel Eklöf
f2497320c6
config: add mouse.alternate-scroll-mode option
This option controls the initial state of the Alternate Scroll Mode,
and defaults to ‘enabled’.
2020-09-15 19:12:29 +02:00
Daniel Eklöf
51a7e44fa2
config: add tweak.scaling-filter
Use the new fcft_set_scaling_filter() API to use a non-default scaling
filter.

By default, we use lanczo3, the ‘best’ filter. This overrides the
default in fcft, which is ‘cubic’ filtering.
2020-09-13 17:59:56 +02:00
Daniel Eklöf
2d4a59ab99
Merge branch 'scroll-half-page' into master
Closes #128
2020-09-11 18:22:09 +02:00
Daniel Eklöf
4d13429235
key-binding: deprecate scrollback-up/down, add scrollback-up/down-line
This deprecates/renames scrollback-up/down to scrollback-up/down-page.

It also renames scrollback-up/down-half to
scrollback-up/down-half-page, and adds the new bindings
scrollback-up/down-line.
2020-09-10 18:17:47 +02:00
Daniel Eklöf
3a308cc870
render: csd: hide buttons when title bar gets too small to fit them 2020-09-10 07:37:54 +02:00
Daniel Eklöf
a1ab31eea5
grid: reflow: make sure cursor is within the visible screen area
Even though we translate the cursor position from the old grid
coordinates to the new, the cursor may _still_ end up outside the
visible area.

Make sure it doesn’t.
2020-09-10 07:37:08 +02:00
Daniel Eklöf
2e3bd5e23c
config: add scrollback-{up,down}-half key bindings
These new bindings scroll up/down half a page in the
scrollback (instead of the full page scrolled by
‘scrollback-{up,down}’).

Closes #128.
2020-09-09 19:40:48 +02:00
Daniel Eklöf
776b831d89
osc52: unset (clear) selection when an invalid payload is received 2020-09-09 19:01:39 +02:00
Daniel Eklöf
99023cae99
Merge branch 'window-size-in-characters' into master 2020-09-09 19:00:30 +02:00
Daniel Eklöf
da091fb9d3
Merge branch 'keymap-shift-return' into master 2020-09-09 19:00:13 +02:00
Daniel Eklöf
eb6737ca25
Add -W,--window-size-chars, and foot.ini:initial-window-size-chars
* Add -W,--window-size-chars command line option
* Add initial-window-size-chars foot.ini option
* Add -w,--window-size-pixels command line option
* Add initial-window-size-pixels foot.ini option
* Deprecate -g,--geometry command line option in favor of
  -w,--window-size-pixels
* Deprecate geometry option in foot.ini in favor of
  initial-window-size-pixels
2020-09-08 19:41:00 +02:00
Daniel Eklöf
fa6ad0f030
changelog: move deprecation section up first, change most ‘footrc’ -> ‘foot.ini’
The deprecation sections mentions ‘footrc’ being deprecated, and
replaced by ‘foot.ini’. Since a lot of the changelog entries refer to
foot.ini, make sure the user sees this first.

Also, use foot.ini (and not footrc) consistently in all changelog entries.
2020-09-08 19:37:59 +02:00
Daniel Eklöf
18e00a55f6
keymap: emit \E[27;2;13~ for all key combinations involving Shift+Return
This is what XTerm emits with `modifyOtherKeys=1`, which is foot’s only mode.
2020-09-07 22:20:13 +02:00
Daniel Eklöf
19ec06b999
Merge branch 'reflow-multi-column-composed-characters' into master 2020-09-07 19:41:42 +02:00
Daniel Eklöf
6e4d29ef71
render: change minimum window size from 4x20 -> 1x2 (rows/cols) 2020-09-07 19:34:06 +02:00
Daniel Eklöf
61f950f77a
grid: reflow: calculate width of composed characters correctly
Before this patch, reflow called `wcwidth()` on our magic values for
composed characters.
2020-09-06 19:14:46 +02:00
Daniel Eklöf
f9cbdd3b11
changelog: scrollback indicator did not exist in 1.4(.4)
Thus it’s wrong to say its behavior has changed.
2020-09-06 19:05:17 +02:00
Daniel Eklöf
dd19173989
Merge branch 'improve-handling-of-private-usage-area-characters' into master
Closes #116
2020-09-06 08:28:20 +02:00
Daniel Eklöf
26d37b3305
changelog: output objects received before XDG output manager 2020-09-04 18:08:37 +02:00
Daniel Eklöf
b71016c25d
render: optionally enable heuristics that deal with private usage area chars
Try to detect double-width *glyphs* for single-width *characters*, and
allow them to overflow into the next cell.

This is only done for single-width chars with a glyph width that is at
least 1.5 cells wide, but at most 3 cells.

The feature is gated by the new
‘tweak.allow-overflowing-double-width-glyphs’, and is disabled by
default.

Closes #116
2020-09-03 17:37:44 +02:00
Daniel Eklöf
3309d8d779
changelog: new configuration file location 2020-08-27 20:02:43 +02:00
Daniel Eklöf
32e2173b5d
Merge branch 'scrollback-indicator-positioning' into master
Closes #108
2020-08-27 19:52:47 +02:00
Daniel Eklöf
2762e044aa
changelog: fixed input events from getting mixed with paste data 2020-08-25 18:56:15 +02:00
Daniel Eklöf
cc24c5f2e0
render: scrollback position: only count _used_ scrollback lines
When calculating where in the scrollback history we are, we previously
did this against the total number of scrollback lines. I.e. the
`scrollback.lines` setting in `footrc`.

Now, we count only the used/allocated scrollback lines.

Note that the initial indicator position might still seem to start a
bit high up, if the number of used scrollback lines is low. This is
because we use the *top* of the screen for the current position. Thus,
we'll never be at the bottom (except for the special case when
we're *really* at the bottom).
2020-08-25 18:45:04 +02:00
Craig Barnes
26fccae03d slave: set $COLORTERM environment variable to "truecolor"
This is also done by libvte, alacritty, kitty and several other
terminal emulators as a way to indicate support for 24-bit RGB
colors. It generally also implies support for the xterm 256-color
palette and basic ECMA-48 colors.
2020-08-23 05:33:48 +01:00
Daniel Eklöf
3ddc17937f
input: inhibit mouse events to client when a binding has consumed it
This introduces a new state to a seat's mouse struct, 'consumed'. It
is set on a mouse *press* event that is claimed by a mouse binding.

It is cleared after a mouse *release* event.

While set, *no* mouse motion or button events are sent to the client
application.
2020-08-22 13:35:36 +02:00
Daniel Eklöf
f85cf47b65
extract: only emit newlines if followed by non-empty cells
Closes #97
2020-08-20 19:22:13 +02:00
Daniel Eklöf
c0ddb78f4a
Merge branch 'selection-exclude-trailing-empty-cells' into master 2020-08-19 06:26:29 +02:00
Daniel Eklöf
1a2c6e183f
Merge branch 'update-grid-on-default-fg-bg-change' into master
Closes #94
2020-08-19 06:25:17 +02:00
Daniel Eklöf
fe95b6a013
changelog: trailing empty cells are not highlighted in mouse selections 2020-08-18 18:03:41 +02:00
Daniel Eklöf
3e1636c013
osc: dirty grids on *all* color modifying sequences
We only updated the grid for OSC 4 - Set color <idx>. But we did *not*
do it for 104 (reset color <idx>), 10 - set default foreground, 11 -
set default background, 110 - reset default foreground, or 111 - reset
default background.
2020-08-18 17:54:11 +02:00
Daniel Eklöf
dfcc4192ce
changelog: xtsave/xtrestore 2020-08-16 17:03:58 +02:00