Lines Matching refs:vc_sel
46 } vc_sel = { variable
47 .lock = __MUTEX_INITIALIZER(vc_sel.lock),
57 invert_screen(vc_sel.cons, s, e-s+2, true); in highlight()
63 complement_pos(vc_sel.cons, where); in highlight_pointer()
70 return screen_glyph_unicode(vc_sel.cons, n / 2); in sel_pos()
71 return inverse_translate(vc_sel.cons, screen_glyph(vc_sel.cons, n), 0); in sel_pos()
83 if (vc_sel.start != -1) { in clear_selection()
84 highlight(vc_sel.start, vc_sel.end); in clear_selection()
85 vc_sel.start = -1; in clear_selection()
92 return vc == vc_sel.cons; in vc_is_sel()
195 bp = kmalloc_array((vc_sel.end - vc_sel.start) / 2 + 1, unicode ? 4 : 1, in vc_selection_store_chars()
202 kfree(vc_sel.buffer); in vc_selection_store_chars()
203 vc_sel.buffer = bp; in vc_selection_store_chars()
206 for (i = vc_sel.start; i <= vc_sel.end; i += 2) { in vc_selection_store_chars()
224 vc_sel.buf_len = bp - vc_sel.buffer; in vc_selection_store_chars()
287 if (vc_sel.start == -1) /* no current selection */ in vc_do_selection()
289 else if (new_sel_start == vc_sel.start) in vc_do_selection()
291 if (new_sel_end == vc_sel.end) /* no action required */ in vc_do_selection()
293 else if (new_sel_end > vc_sel.end) /* extend to right */ in vc_do_selection()
294 highlight(vc_sel.end + 2, new_sel_end); in vc_do_selection()
296 highlight(new_sel_end + 2, vc_sel.end); in vc_do_selection()
298 else if (new_sel_end == vc_sel.end) in vc_do_selection()
300 if (new_sel_start < vc_sel.start) /* extend to left */ in vc_do_selection()
301 highlight(new_sel_start, vc_sel.start - 2); in vc_do_selection()
303 highlight(vc_sel.start, new_sel_start - 2); in vc_do_selection()
310 vc_sel.start = new_sel_start; in vc_do_selection()
311 vc_sel.end = new_sel_end; in vc_do_selection()
345 if (vc_sel.cons != vc) { in vc_selection()
347 vc_sel.cons = vc; in vc_selection()
357 mutex_lock(&vc_sel.lock); in set_selection_kernel()
361 mutex_unlock(&vc_sel.lock); in set_selection_kernel()
393 mutex_lock(&vc_sel.lock); in paste_selection()
394 while (vc_sel.buffer && vc_sel.buf_len > pasted) { in paste_selection()
401 mutex_unlock(&vc_sel.lock); in paste_selection()
403 mutex_lock(&vc_sel.lock); in paste_selection()
407 count = vc_sel.buf_len - pasted; in paste_selection()
408 count = tty_ldisc_receive_buf(ld, vc_sel.buffer + pasted, NULL, in paste_selection()
412 mutex_unlock(&vc_sel.lock); in paste_selection()