Skip to content

Commit

Permalink
Handle special case for multiline input with 'old tab behavior' where…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Dec 24, 2012
1 parent d7a5f3f commit 3c72b20
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Fl_Input.cxx
Expand Up @@ -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());
Expand Down

0 comments on commit 3c72b20

Please sign in to comment.