Reset selection flag when clearing or stopping selection, from Mark

Kelly.
This commit is contained in:
nicm 2020-03-15 20:44:19 +00:00
parent fa3871b1be
commit 882d0b785d

View File

@ -305,6 +305,7 @@ window_copy_common_init(struct window_mode_entry *wme)
data->cursordrag = CURSORDRAG_NONE;
data->lineflag = LINE_SEL_NONE;
data->selflag = SEL_CHAR;
if (wp->searchstr != NULL) {
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->lineflag = LINE_SEL_NONE;
data->selflag = SEL_CHAR;
return (WINDOW_COPY_CMD_NOTHING);
}
@ -3360,6 +3362,7 @@ window_copy_clear_selection(struct window_mode_entry *wme)
data->cursordrag = CURSORDRAG_NONE;
data->lineflag = LINE_SEL_NONE;
data->selflag = SEL_CHAR;
py = screen_hsize(data->backing) + data->cy - data->oy;
px = window_copy_find_length(wme, py);