From 3c72b20458c943f650ddc071577b9876461d6389 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 24 Dec 2012 04:06:46 +0000 Subject: Handle special case for multiline input with 'old tab behavior' where tab is entered as a character: didn't work when selection had been done with ctrl-A. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9773 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Input.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Fl_Input.cxx') diff --git a/src/Fl_Input.cxx b/src/Fl_Input.cxx index 92fb64b05..094912ea1 100644 --- a/src/Fl_Input.cxx +++ b/src/Fl_Input.cxx @@ -617,7 +617,8 @@ int Fl_Input::handle(int event) { && !Fl::event_state(FL_SHIFT) // no shift? && !tab_nav() // with tab navigation disabled? && input_type() == FL_MULTILINE_INPUT // with a multiline input? - && (mark()==0 && position()==size())) { // while entire field selected? + && size() > 0 // non-empty field? + && ((mark()==0 && position()==size()) || (position()==0 && mark()==size()))) {// while entire field selected? // Set cursor to the end of the selection... if (mark() > position()) position(mark()); -- cgit v1.2.3