mirror of
https://github.com/tmux/tmux.git
synced 2025-09-03 14:27:09 +00:00
Merge branch 'obsd-master'
This commit is contained in:
13
key-string.c
13
key-string.c
@ -257,6 +257,10 @@ key_string_lookup_key(key_code key)
|
|||||||
return (out);
|
return (out);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Display C-@ as C-Space. */
|
||||||
|
if ((key & KEYC_MASK_KEY) == 0)
|
||||||
|
key = ' ' | KEYC_CTRL | (key & KEYC_MASK_MOD);
|
||||||
|
|
||||||
/* Fill in the modifiers. */
|
/* Fill in the modifiers. */
|
||||||
if (key & KEYC_CTRL)
|
if (key & KEYC_CTRL)
|
||||||
strlcat(out, "C-", sizeof out);
|
strlcat(out, "C-", sizeof out);
|
||||||
@ -329,15 +333,6 @@ key_string_lookup_key(key_code key)
|
|||||||
return (out);
|
return (out);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Special case: display C-@ as C-Space. Could do this below in
|
|
||||||
* the (key >= 0 && key <= 32), but this way we let it be found
|
|
||||||
* in key_string_table, for the unlikely chance that we might
|
|
||||||
* change its name.
|
|
||||||
*/
|
|
||||||
if ((key & KEYC_MASK_KEY) == 0)
|
|
||||||
key = ' ' | KEYC_CTRL | (key & KEYC_MASK_MOD);
|
|
||||||
|
|
||||||
/* Try the key against the string table. */
|
/* Try the key against the string table. */
|
||||||
for (i = 0; i < nitems(key_string_table); i++) {
|
for (i = 0; i < nitems(key_string_table); i++) {
|
||||||
if (key == key_string_table[i].key)
|
if (key == key_string_table[i].key)
|
||||||
|
@ -305,6 +305,7 @@ window_copy_common_init(struct window_mode_entry *wme)
|
|||||||
|
|
||||||
data->cursordrag = CURSORDRAG_NONE;
|
data->cursordrag = CURSORDRAG_NONE;
|
||||||
data->lineflag = LINE_SEL_NONE;
|
data->lineflag = LINE_SEL_NONE;
|
||||||
|
data->selflag = SEL_CHAR;
|
||||||
|
|
||||||
if (wp->searchstr != NULL) {
|
if (wp->searchstr != NULL) {
|
||||||
data->searchtype = WINDOW_COPY_SEARCHUP;
|
data->searchtype = WINDOW_COPY_SEARCHUP;
|
||||||
@ -739,6 +740,7 @@ window_copy_cmd_stop_selection(struct window_copy_cmd_state *cs)
|
|||||||
|
|
||||||
data->cursordrag = CURSORDRAG_NONE;
|
data->cursordrag = CURSORDRAG_NONE;
|
||||||
data->lineflag = LINE_SEL_NONE;
|
data->lineflag = LINE_SEL_NONE;
|
||||||
|
data->selflag = SEL_CHAR;
|
||||||
return (WINDOW_COPY_CMD_NOTHING);
|
return (WINDOW_COPY_CMD_NOTHING);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3360,6 +3362,7 @@ window_copy_clear_selection(struct window_mode_entry *wme)
|
|||||||
|
|
||||||
data->cursordrag = CURSORDRAG_NONE;
|
data->cursordrag = CURSORDRAG_NONE;
|
||||||
data->lineflag = LINE_SEL_NONE;
|
data->lineflag = LINE_SEL_NONE;
|
||||||
|
data->selflag = SEL_CHAR;
|
||||||
|
|
||||||
py = screen_hsize(data->backing) + data->cy - data->oy;
|
py = screen_hsize(data->backing) + data->cy - data->oy;
|
||||||
px = window_copy_find_length(wme, py);
|
px = window_copy_find_length(wme, py);
|
||||||
|
Reference in New Issue
Block a user