From 8132eba4f5ab7a698974316bc2624077ade36937 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 13 Dec 2010 12:30:49 +0000 Subject: Fix STR #2478: added missing code that updates the FLTK selection buffer after the Fl_Text_xxx selection is changed by shift-arrow key. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8024 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Text_Editor.cxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/Fl_Text_Editor.cxx') diff --git a/src/Fl_Text_Editor.cxx b/src/Fl_Text_Editor.cxx index d7b988b1f..dd53c8a72 100644 --- a/src/Fl_Text_Editor.cxx +++ b/src/Fl_Text_Editor.cxx @@ -317,6 +317,11 @@ int Fl_Text_Editor::kf_move(int c, Fl_Text_Editor* e) { int Fl_Text_Editor::kf_shift_move(int c, Fl_Text_Editor* e) { kf_move(c, e); fl_text_drag_me(e->insert_position(), e); + char *copy = e->buffer()->selection_text(); + if (copy) { + Fl::copy(copy, strlen(copy), 0); + free(copy); + } return 1; } /** Moves the current text cursor in the direction indicated by control key */ -- cgit v1.2.3