Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

context: clear output and preedit on reset

  • Loading branch information...
commit 0b362f579897667db92ac6d3a3dea55f7c3cd787 1 parent 69a57ce
Daiki Ueno authored August 23, 2012

Showing 1 changed file with 11 additions and 2 deletions. Show diff stats Hide diff stats

  1. 13  libskk/context.vala
13  libskk/context.vala
@@ -539,11 +539,20 @@ namespace Skk {
539 539
                 pop_state ();
540 540
                 state_stack.peek_head ().cancel_okuri ();
541 541
             }
542  
-            // to restore surrounding text after focus change
  542
+
543 543
             var state = state_stack.peek_head ();
544  
-            state.output_surrounding_text ();
  544
+
  545
+            // will clear state.candidates but not state.output
545 546
             state.reset ();
  547
+
  548
+            // need to manually assign it because
  549
+            // _candidates.candidates may point to a State object different
  550
+            // from state, when dict edit
546 551
             ((ProxyCandidateList) _candidates).candidates = state.candidates;
  552
+
  553
+            // clear output and preedit
  554
+            clear_output ();
  555
+            preedit = "";
547 556
         }
548 557
 
549 558
         /**

0 notes on commit 0b362f5

Please sign in to comment.
Something went wrong with that request. Please try again.