Only update the selected text to clipboard when the selection is finished, not continuously as it is updated.

Fixes #1460
Fixes #1492
This commit is contained in:
Kovid Goyal
2019-03-24 08:44:12 +05:30
parent ecf2c86787
commit cb095be0cc
3 changed files with 6 additions and 3 deletions

View File

@@ -95,6 +95,9 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
characters after private use unicode characters to not be respected characters after private use unicode characters to not be respected
(:iss:`1455`) (:iss:`1455`)
- Only update the selected text to clipboard when the selection is finished,
not continuously as it is updated. (:iss:`1460`)
0.13.3 [2019-01-19] 0.13.3 [2019-01-19]
------------------------------ ------------------------------

View File

@@ -203,7 +203,7 @@ static inline void
extend_selection(Window *w) { extend_selection(Window *w) {
Screen *screen = w->render_data.screen; Screen *screen = w->render_data.screen;
if (screen_has_selection(screen)) { if (screen_has_selection(screen)) {
screen_update_selection(screen, w->mouse_pos.cell_x, w->mouse_pos.cell_y, false); screen_update_selection(screen, w->mouse_pos.cell_x, w->mouse_pos.cell_y, true);
} }
} }
@@ -321,7 +321,7 @@ multi_click(Window *w, unsigned int count) {
} }
if (found_selection) { if (found_selection) {
screen_start_selection(screen, start, y1, false, mode); screen_start_selection(screen, start, y1, false, mode);
screen_update_selection(screen, end, y2, false); screen_update_selection(screen, end, y2, true);
} }
} }

View File

@@ -2108,7 +2108,7 @@ screen_update_selection(Screen *self, index_type x, index_type y, bool ended) {
case EXTEND_CELL: case EXTEND_CELL:
break; break;
} }
call_boss(set_primary_selection, NULL); if (!self->selection.in_progress) call_boss(set_primary_selection, NULL);
} }
static PyObject* static PyObject*