Commit graph

19 commits

Author SHA1 Message Date
Daniel Eklöf
aa01521ff6
selection: add selection_extend()
This function extends an existing selection in the following way:

If the extension point is *before* the upper boundary of the current
selection, extend the selection upwards.

If the extension point is *after* the bottom boundary of the current
selection, extend the selection downwards.

If the extension point is *inside* the current selection, shrink the
selection such that the new size is maximized. This means we move the
*closest* start/end point from in the current selection.
2020-04-04 11:59:15 +02:00
Daniel Eklöf
d706e68280
selection: track selection type; normal or block selection 2020-01-03 23:29:45 +01:00
Daniel Eklöf
fd82caad42
selection: document the asynchronous behavior of text_from_{primary,clipboard} 2019-11-05 09:13:47 +01:00
Daniel Eklöf
b15032d223
selection: text_from_{clipboard,primary}: add 'done' callback
This callback is *always* called, including when there has been an
error.

This is in preparation for making text_from_{clipboard,primary}
asynchronous.
2019-11-05 08:49:32 +01:00
Daniel Eklöf
15afd26716
osc: implement copy/paste to/from primary 2019-08-09 21:27:51 +02:00
Daniel Eklöf
70b6d9d7d2
input: don't paste from primary if client is mouse tracking 2019-08-09 21:26:34 +02:00
Daniel Eklöf
481a1cd678
selection/input: triple click selects an entire row 2019-08-06 19:32:06 +02:00
Daniel Eklöf
c06f141189
term: cancel selection when scrolling wraps
If we scroll enough, we'll eventually end up wrapping around the
entire scrollback buffer. At this point, a selection is no longer
valid, so cancel it.

Note: this was very obvious when scrolling in the alt screen, since
its scrollback buffer is what you see on the screen (i.e. it has no
scrollback).
2019-08-05 20:16:17 +02:00
Daniel Eklöf
c62ce72778
selection: mark-word using spaces only as word separator
When the user double-clicks with ctrl pressed, we now select the word
under the cursor using spaces only as word separator.
2019-08-05 19:02:27 +02:00
Daniel Eklöf
793c37923e
selection: add text_from_clipboard()
This function reads data from the clipboard, and calls a user-provided
callback for each chunk of clipboard data.
2019-07-19 14:20:00 +02:00
Daniel Eklöf
167036ccbe
selection: add text_to_clipboard()
This function takes a string and makes it available to the clipboard.
2019-07-19 11:12:14 +02:00
Daniel Eklöf
8bd969262b
selection: implement double-click-to-select-word 2019-07-17 21:30:57 +02:00
Daniel Eklöf
66e067082b
selection: implement copy *to* primary 2019-07-11 17:38:03 +02:00
Daniel Eklöf
703aeecb95
selection: add support for pasting *from* primary 2019-07-11 17:38:03 +02:00
Daniel Eklöf
e56066feef
selection: add selection_from_primary() API (stub for now) 2019-07-11 17:38:03 +02:00
Daniel Eklöf
482c8f76a9
selection: add support for pasting from clipboard 2019-07-11 17:38:02 +02:00
Daniel Eklöf
b50ec1a850
selection: initial copy-to-clipboard functionality 2019-07-11 17:38:02 +02:00
Daniel Eklöf
e7e199d6b5
selection: spell 'finalize' correctly 2019-07-11 17:38:02 +02:00
Daniel Eklöf
bcf763d417
selection: add a selection API 2019-07-11 17:38:01 +02:00