Commit graph

2542 commits

Author SHA1 Message Date
Daniel Eklöf
22dcbeacb7
csi: xtsave/xtrestore: implement \E[?12s and \E[?12r
I.e. save/restore cursor-blink state.
2020-08-18 07:00:26 +02:00
Daniel Eklöf
15ae82e62e
csi: decset/decrst: only clear mouse tracking/reporting if mode matches
E.g. only set mouse reporting to NONE, if mouse reporting mode is SGR
and an DECRST SGR is issued.

Do *not* reset the mouse mode if e.g. mouse reporting mode is SGR and
an DECRST URXVT is issued.
2020-08-18 06:53:47 +02:00
Daniel Eklöf
dfcc4192ce
changelog: xtsave/xtrestore 2020-08-16 17:03:58 +02:00
Daniel Eklöf
23a5ff53eb
csi: implement XTRESTORE 2020-08-16 17:02:52 +02:00
Daniel Eklöf
d4473c4e67
term: xtsave: store state in a bitfield
These shouldn't be accessed in any performance critical paths, so lets
save some memory and use a bitfield.
2020-08-16 16:58:32 +02:00
Daniel Eklöf
b4f868e566
csi: xtsave: store modes' SET state, not the current state 2020-08-16 16:57:39 +02:00
Daniel Eklöf
cc48366f02
csi: implement CSI ? Pm s - XTSAVE 2020-08-16 16:47:46 +02:00
Daniel Eklöf
5593868471
csi: add xtsave()
This function stores the current state of DECSET private modes.
2020-08-16 16:46:21 +02:00
Daniel Eklöf
0787080023
csi: decrst: spell decset correctly 2020-08-16 16:38:30 +02:00
Daniel Eklöf
cf315de174
csi: add DEC names to a couple of DECSET modes 2020-08-16 16:25:52 +02:00
Daniel Eklöf
2eebf9b8cc
csi: break out decset/decrst 2020-08-16 16:23:17 +02:00
Daniel Eklöf
38ee05b1c7
Merge branch 'spelling-fix' into master 2020-08-16 16:04:37 +02:00
Craig Barnes
44499bbfe1 Fix spelling mistake in vt.c 2020-08-16 14:37:27 +01:00
Daniel Eklöf
5ab09cdc90
changelog: add ordoviz to contributors 2020-08-16 09:14:15 +02:00
Daniel Eklöf
a767139844
Merge branch 'typos' into master 2020-08-16 09:12:48 +02:00
Lennard Hofmann
df576d9a8e Fix typos 2020-08-15 23:29:38 +02:00
Daniel Eklöf
2ab2f5e99d
Merge branch 'spelling-fixes' into master 2020-08-15 21:28:13 +02:00
Daniel Eklöf
2013c373e6
Merge branch 'typo' into master 2020-08-15 21:26:49 +02:00
Craig Barnes
104fe2fa55 Fix some spelling mistakes 2020-08-15 19:39:00 +01:00
Birger Schacht
5d761a03cc Fix typo 2020-08-15 17:44:11 +02:00
Daniel Eklöf
ef1bab6559
readme: ctrl+shift+n: add link to wiki 2020-08-15 11:27:17 +02:00
Daniel Eklöf
b07a43c20e
changelog: remove duplicate entries (caused by bad merge) 2020-08-14 22:54:42 +02:00
Daniel Eklöf
b0d41324d6
render: render the render timer *before* committing the main surface 2020-08-14 07:52:08 +02:00
Daniel Eklöf
640445acb4
render: render-timer: position sub-surface similar to the scrollback indicator 2020-08-14 07:48:40 +02:00
Daniel Eklöf
394db77b04
Merge branch 'mouse-binding-actions' into master
Closes #79. Closes #75.
2020-08-14 07:39:11 +02:00
Daniel Eklöf
d29c4aed8a
input: mouse motion: don't update selection while scrollback searching
When we are doing a scrollback search, the selection *is* ongoing. We
still don't want to update the selection when the mouse moves.
2020-08-14 07:38:56 +02:00
Daniel Eklöf
bb9228dd21
input: bindings: calculate 'cursor_is_on_grid' once only 2020-08-14 07:38:56 +02:00
Daniel Eklöf
2764a8394a
footrc: fix combo for select-begin-block
Typo: should be a '+', not a '='.
2020-08-14 07:38:56 +02:00
Daniel Eklöf
364412bfaa
input: mouse-bindings: ignore Shift
Shift is used to enable selection when the client application is
grabbing the mouse.

As such, mouse bindings *never* have Shift as a modifier, but should
still trigger when Shift is being pressed.
2020-08-14 07:38:56 +02:00
Daniel Eklöf
517d13fbce
config: don't allow Shift in mouse bindings
Shift is a special modifier that is used to enable selection when the
client application is grabbing the mouse.
2020-08-14 07:38:56 +02:00
Daniel Eklöf
28410f1b99
input: mouse-bindings: check selection is enabled/possible and that pointer is on grid
We shouldn't start or modify a selection if selection isn't
possible (i.e. client application is grabbing the mouse, and user
isn't holding Shift).

We also shouldn't start or modify a selection if the pointer is
outside the grid (updating an ongoing selection on motion events is an
exception to this).
2020-08-14 07:38:56 +02:00
Daniel Eklöf
24ee6d836b
doc: footrc: mouse-bindings: clean up description 2020-08-14 07:38:56 +02:00
Daniel Eklöf
8f99a032c9
changelog: new mouse actions 2020-08-14 07:38:56 +02:00
Daniel Eklöf
4d2bc54fa2
config: mouse bindings: add select-begin-block and select-row 2020-08-14 07:38:56 +02:00
Daniel Eklöf
f14b49068a
selection: extend: set ongoing to true 2020-08-14 07:38:56 +02:00
Daniel Eklöf
9517c6443c
selection: finalize: clear ongoing selection
Check for ongoing selection, and *clear* it before bailing out due to
the selection not having an end-point.

This fixes an issue where a selection was kept as ongoing, even though
the button had been released. Typically triggered by clicking without
moving the mouse; this started a new selection, then (tried to)
finalize it, but failed since the selection didn't have an end-point.
2020-08-14 07:38:55 +02:00
Daniel Eklöf
cddeaa2c1c
selection: update: don't update if there's no ongoing selection 2020-08-14 07:38:55 +02:00
Daniel Eklöf
9352befd13
doc: footrc: document the new mouse actions 2020-08-14 07:38:55 +02:00
Daniel Eklöf
20f0334e13
config: add mouse specific bind actions
This extends the "normal" bind action enum with mouse specific
actions.

When parsing key bindings, we only check up to the last valid keyboard
binding, while mouse bindings support *both* key actions and mouse
actions.

The new actions are:

* select-begin: starts an interactive selection
* select-extend: interactively extend an existing selection
* select-word: select word under cursor
* select-word-whitespace: select word under cursor, where the only
  word separating characters are whitespace characters.

The old hard-coded selection "bindings" have been converted to instead
use these actions, via default bindings added to the configuration.
2020-08-14 07:38:55 +02:00
Daniel Eklöf
1dd142aeab
changelog: click count in mouse bindings 2020-08-14 07:38:55 +02:00
Daniel Eklöf
8ed3f66ad9
changelog: modifier support in mouse bindings 2020-08-14 07:38:55 +02:00
Daniel Eklöf
d940815f6d
Merge branch 'click-count-in-mouse-bindings' into master
Closes #78
2020-08-14 07:38:05 +02:00
Daniel Eklöf
f647816ff7
changelog: click count in mouse bindings 2020-08-14 07:36:53 +02:00
Daniel Eklöf
c6ad765f91
doc: footrc: document click count in mouse bindings 2020-08-14 07:36:53 +02:00
Daniel Eklöf
d74e583089
config: mouse bindings: add support for click count
Specified by appending "-X", where X is a number.
2020-08-14 07:36:53 +02:00
Daniel Eklöf
593cad3680
config: wrap LOG_AND_NOTIFY_*() in do {} while (0)
This allows us to use these macros in if-statement without braces.
2020-08-14 07:36:53 +02:00
Daniel Eklöf
9b65531d6a
Merge branch 'modifiers-in-mouse-bindings' into master 2020-08-14 07:36:34 +02:00
Daniel Eklöf
44557dc7cf
input: don't crash on mouse motion events on the render timer surface 2020-08-14 07:35:01 +02:00
Daniel Eklöf
b783e4c6ea
doc: footrc: document modifiers in mouse bindings 2020-08-13 18:47:20 +02:00
Daniel Eklöf
704d182c88
changelog: modifier support in mouse bindings 2020-08-13 18:47:20 +02:00