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.
This commit is contained in:
Daniel Eklöf 2019-08-05 19:02:27 +02:00
parent 528ee9925c
commit c62ce72778
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 15 additions and 8 deletions

View file

@ -1,5 +1,6 @@
#pragma once
#include <stdbool.h>
#include <wayland-client.h>
#include "terminal.h"
@ -11,7 +12,8 @@ void selection_start(struct terminal *term, int col, int row);
void selection_update(struct terminal *term, int col, int row);
void selection_finalize(struct terminal *term, uint32_t serial);
void selection_cancel(struct terminal *term);
void selection_mark_word(struct terminal *term, int col, int row, uint32_t serial);
void selection_mark_word(struct terminal *term, int col, int row,
bool spaces_only, uint32_t serial);
void selection_to_clipboard(struct terminal *term, uint32_t serial);
void selection_from_clipboard(struct terminal *term, uint32_t serial);