Commit graph

3603 commits

Author SHA1 Message Date
Daniel Eklöf
1d9cd8cc04
Merge branch 'mouse-events-never-sent-to-client' 2021-02-04 19:28:40 +01:00
Daniel Eklöf
5a2e44e24e
changelog: some mouse events never being sent to the client application 2021-02-02 09:53:24 +01:00
Daniel Eklöf
eff8481cdc
selection: remove selection_enabled()
Its name did not reflect its semantics. Since it was only used in a
single place, “inline” it there, and get rid of it.
2021-02-02 09:52:22 +01:00
Daniel Eklöf
d6b1dbf8d9
input: don’t execute mouse bindings when the application is grabbing the mouse
When the application is grabbing the mouse, we require ‘shift’ to be
pressed to be able to use foot’s mouse bindings. Otherwise the mouse
event is sent to the application.

This wasn’t being enforced consistently; each and every mouse **only**
action was checking the mouse grab state, but e.g. *primary
paste* (which can be used as both a key binding and a mouse binding)
was not.

The fix is actually quite simple: don’t even try to execute *any*
mouse bindings when the application is grabbing the mouse (unless
shift is pressed).

This fixes an issue where e.g. middle mouse button events (using the
default mouse bindings) were never seen by any mouse grabbing client
applications.
2021-02-02 09:52:05 +01:00
Daniel Eklöf
f8da14eed5
term: term_mouse_grabbed: return true if mouse tracking is disabled 2021-02-02 09:51:22 +01:00
Daniel Eklöf
e1eed7bafc
Merge branch 'reset-term-ime-on-text-input-leave' 2021-01-31 12:12:16 +01:00
Daniel Eklöf
48270187ca
notify: repair debug log: the parameter has been renamed: msg -> body 2021-01-31 10:26:36 +01:00
Tadeo Kondrak
1515b7e44b
ime: Reset terminal's IME state on text_input.leave
To reproduce issue:
- Launch an IME from inside foot
- Type in some preedit text
- Use Ctrl-C to close the IME
- IME text stays in terminal until focus is changed
2021-01-30 12:24:12 -07:00
Daniel Eklöf
c4363ef336
Merge branch 'releases/1.6' 2021-01-29 20:12:32 +01:00
Daniel Eklöf
4c168b84cf
meson/pkgbuild: bump version to 1.6.3 2021-01-29 19:53:10 +01:00
Daniel Eklöf
efd1e05b48
changelog: prepare for 1.6.3 2021-01-29 19:52:27 +01:00
Tadeo Kondrak
8f0a3ee7a9
Send text_input_rectangle requests for text-input 2021-01-29 19:39:48 +01:00
Daniel Eklöf
87d6739c03
Merge branch 'text-input-rectangle'
Closes #309
2021-01-29 19:32:59 +01:00
Daniel Eklöf
9411054b50
ci: freebsd: don’t need -Wno-missing-braces anymore
builds.sr.ht has been updated to FreeBSD-12.2
2021-01-29 10:57:32 +01:00
Daniel Eklöf
44ebb14ffb
Merge branch 'drop-wno-missing-braces-from-freebsd' 2021-01-29 10:57:10 +01:00
Tadeo Kondrak
95c0c89cac
Send text_input_rectangle requests for text-input 2021-01-28 22:22:01 -07:00
Daniel Eklöf
0a645d67a7
ci: freebsd: don’t need -Wno-missing-braces anymore
builds.sr.ht has been updated to FreeBSD-12.2
2021-01-28 07:34:44 +01:00
Daniel Eklöf
7049c95b62
selection: don’t replace \r\n and \n with \r in bracketed paste mode 2021-01-27 10:54:37 +01:00
Daniel Eklöf
4c0c972726
Merge branch 'selection-no-newline-replace-in-bracketed-paste' 2021-01-27 10:54:10 +01:00
Daniel Eklöf
81fb756ea7
selection: don’t replace \r\n and \n with \r in bracketed paste mode 2021-01-27 10:44:28 +01:00
Daniel Eklöf
567071e48a
selection: no xassert() in the releases/1.6 branch 2021-01-26 20:48:56 +01:00
Daniel Eklöf
5db389da21
search: match composed characters when extending the search string to the next word boundary 2021-01-26 20:47:51 +01:00
Daniel Eklöf
709d6deeae
search: fix matching of multi-column characters
We were matching the sub-sequence SPACERs as if they were regular
characters, which obviously failed.
2021-01-26 20:47:43 +01:00
Daniel Eklöf
7611a6c7fc
selection: remove duplicate ‘ESC’ in switch case 2021-01-26 20:47:37 +01:00
Daniel Eklöf
c8fdd3a214
selection: DEL is 0x7f, not 0x1f 2021-01-26 20:47:35 +01:00
Daniel Eklöf
94d587fa6a
selection: codespell: stript -> strip 2021-01-26 20:47:32 +01:00
Daniel Eklöf
9f8856ee7d
selection: strip non-formatting C0, BS, HT and DEL from pasted text 2021-01-26 20:47:22 +01:00
Daniel Eklöf
579f3cf8e3
selection: unbreak text/uri-list decoding: we’re not using \r, not \n
Before passing the pasted text to the decoder, we now replace \r\n,
and \n, with \r.

The URI decoder was looking for a \n, which meant we failed to split
up the list and instead pasted a single “multi-line” URI.
2021-01-26 20:47:19 +01:00
Daniel Eklöf
f32b924241
selection: replace \r\n and \n with \r, and strip \e from pasted text
Closes #305
Closes #306
2021-01-26 20:47:14 +01:00
Daniel Eklöf
adbf036053
ime: fix rendering of pre-edit cursor when positioned after the pre-edit string
We failed to convert the byte-indices to cell indices, resulting in a
box cursor covering the entire pre-edit string.

Note that in addition to fixing the translation from byte index to
cell index, the rendered had to be updated to dirty one extra cell
from the original grid.

Without this, we left trailing cursors behind us when the user deleted
text from the pre-edit string.
2021-01-26 20:46:59 +01:00
Daniel Eklöf
f9a43209f2
search: ad-hoc workaround for combining characters with positive x-offsets
When rendering the search input box, do the same ad-hoc workaround for
combining characters with a positive x-offset as we do when rendering
normal grid cells.

In this case, we don’t *know* when we’re dealing with combining
characters. But we can detect zero-width characters. For these, check
their glyph’s x-offset. If positive, adjust it like we do when
rendering combining glyphs in the main grid, to ensure the glyph is
positioned over the _previous_ character, not the next.
2021-01-26 20:46:50 +01:00
Daniel Eklöf
569795a529
changelog: high cpu usage while holding down e.g. arrow keys in search mode 2021-01-26 20:45:42 +01:00
Daniel Eklöf
9d51f2cb1a
search: don’t re-scan the scrollback unless the search string actually has changed 2021-01-26 20:45:35 +01:00
Daniel Eklöf
8df49c7f84
search: fix matching against composed characters 2021-01-26 20:43:18 +01:00
Daniel Eklöf
b4448d2c03
changelog: search input box no longer accepts non-printables 2021-01-26 20:43:06 +01:00
Daniel Eklöf
96af3971de
search: filter out non-printable characters
Don’t allow non-printable characters in the search input string.
2021-01-26 20:42:09 +01:00
Daniel Eklöf
3252131dd4
terminal: fix encoding of mouse buttons 6 and 7 in mouse events
These two buttons were encoded using the *exact* same numbers as
button 4 and 5 (scroll wheel up/down), making it impossible to
distinguish them.

The relevant section from XTerm’s control sequences documentation is:

    Some wheel mice can send additional button events, e.g., by tilting the
    scroll wheel left and right.

    Additional buttons are encoded like the wheel mice,

    o  by adding 64 (for buttons 6 and 7), or

    o  by adding 128 (for buttons 8 through 11).
2021-01-26 20:41:25 +01:00
Daniel Eklöf
c1675af103
Merge branch 'delay-tiocswinsz-on-interactive-resize'
Closes #283
Closes #301
2021-01-26 20:32:04 +01:00
Daniel Eklöf
0d4dc7e44b
Merge branch 'search-extend-to-word-boundary-handle-composed-chars' 2021-01-26 20:31:16 +01:00
Daniel Eklöf
2310ffd1b8
search: match composed characters when extending the search string to the next word boundary 2021-01-26 20:26:34 +01:00
Daniel Eklöf
e9fa8bb219
Merge branch 'search-match-multi-column-chars-2' 2021-01-26 20:18:08 +01:00
Daniel Eklöf
fc33619b19
search: fix matching of multi-column characters
We were matching the sub-sequence SPACERs as if they were regular
characters, which obviously failed.
2021-01-26 20:05:14 +01:00
Daniel Eklöf
3a7588bc99
config: promote tweak.resize-delay-ms to a real, supported option 2021-01-26 19:32:21 +01:00
Daniel Eklöf
7cba42c5ce
doc: foot.ini: resize-delay-ms: language tweaks 2021-01-26 19:32:20 +01:00
Daniel Eklöf
d1a0892131
doc: foot.ini: explicitly say that 0 disables the delay 2021-01-26 19:32:20 +01:00
Daniel Eklöf
22a659881b
doc: foot.ini: resize-delay-ms 2021-01-26 19:32:20 +01:00
Daniel Eklöf
af0fbdfd07
changelog: tiocswinsz is now delayed by 100ms while doing an interactive resize 2021-01-26 19:32:19 +01:00
Daniel Eklöf
a2b3ab6d9e
render: remove unneeded parantheses 2021-01-26 19:32:07 +01:00
Daniel Eklöf
b4f1f72585
render: don’t center content while doing an interactive resize 2021-01-26 19:32:07 +01:00
Daniel Eklöf
2dc774fb17
render: remove debug logging 2021-01-26 19:32:07 +01:00