[haiku-webkit-commits] r447 - webkit/trunk/WebKit/haiku/WebPositive/autocompletion

  • From: webkit@xxxxxxxxxxxxxxx
  • To: haiku-webkit-commits@xxxxxxxxxxxxx
  • Date: Wed, 21 Apr 2010 11:49:28 +0000

Author: stippi
Date: Wed Apr 21 11:49:28 2010
New Revision: 447
URL: http://mmlr.dyndns.org/changeset/447

Log:
When selecting choices in the auto-completion pop-up, insert the current choice
into the text view, so the user can continue typing from that choice, or modify
it. For example, one can type "dev.haiku-os.org", select a choice
"http://dev.haiku-os.org/ticket/1234"; and then replace just the last chunk with
another ticket number and press enter.

Modified:
   webkit/trunk/WebKit/haiku/WebPositive/autocompletion/TextViewCompleter.cpp

Modified: 
webkit/trunk/WebKit/haiku/WebPositive/autocompletion/TextViewCompleter.cpp
==============================================================================
--- webkit/trunk/WebKit/haiku/WebPositive/autocompletion/TextViewCompleter.cpp  
Wed Apr 21 10:50:26 2010        (r446)
+++ webkit/trunk/WebKit/haiku/WebPositive/autocompletion/TextViewCompleter.cpp  
Wed Apr 21 11:49:28 2010        (r447)
@@ -94,9 +94,15 @@
        switch (bytes[0]) {
                case B_UP_ARROW:
                        SelectPrevious();
+                       // Insert the current choice into the text view, so the 
user can
+                       // continue typing. This will not trigger another 
evaluation, since
+                       // we don't invoke EditViewStateChanged().
+                       ApplyChoice(false);
                        return B_SKIP_MESSAGE;
                case B_DOWN_ARROW:
                        SelectNext();
+                       // See above.
+                       ApplyChoice(false);
                        return B_SKIP_MESSAGE;
                case B_ESCAPE:
                        CancelChoice();

Other related posts:

  • » [haiku-webkit-commits] r447 - webkit/trunk/WebKit/haiku/WebPositive/autocompletion - webkit