diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-05-19 20:34:48 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-05-19 20:34:48 -0700 |
commit | 1f8bf765519f3245fd646046f593ffd8ac215061 (patch) | |
tree | 6a39e23bc9f4482aa155ecaed9f66b5da379534d /linenoise/linenoise.h | |
parent | e0035c263127c0a8eb864d64d69a17179b207bdd (diff) | |
download | txr-1f8bf765519f3245fd646046f593ffd8ac215061.tar.gz txr-1f8bf765519f3245fd646046f593ffd8ac215061.tar.bz2 txr-1f8bf765519f3245fd646046f593ffd8ac215061.zip |
linenoise: support inclusive selection.
* linenoise/linenoise.c (struct lino_state): New mode flag,
selinclusive.
(lino_set_selinclusive, lino_get_selinclusive): New functions.
(sync_data_to_buf): Adjust rightmost endpoint when
selection is reversed and inclusive mode is in effect,
so that the included character will be visually highlighted.
(yank_sel, delete_sel): Adjust endpoint of selection
if in in inclusive mode.
* linenoise/linenoise.h (lino_set_selinclusive,
lino_get_selinclusive): Declared.
Diffstat (limited to 'linenoise/linenoise.h')
-rw-r--r-- | linenoise/linenoise.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/linenoise/linenoise.h b/linenoise/linenoise.h index afe99c82..f6b692e5 100644 --- a/linenoise/linenoise.h +++ b/linenoise/linenoise.h @@ -72,6 +72,8 @@ int lino_hist_load(lino_t *, const char *filename); int lino_clear_screen(lino_t *); void lino_set_multiline(lino_t *, int ml); int lino_get_multiline(lino_t *); +void lino_set_selinclusive(lino_t *, int si); +int lino_get_selinculsive(lino_t *); typedef char *lino_atom_cb_t(lino_t *, const char *line, int n, void *ctx); void lino_set_atom_cb(lino_t *, lino_atom_cb_t *, void *ctx); |