Permalink
Browse files

context: clear output and preedit on reset

  • Loading branch information...
1 parent 69a57ce commit 0b362f579897667db92ac6d3a3dea55f7c3cd787 @ueno committed Aug 23, 2012
Showing with 11 additions and 2 deletions.
  1. +11 −2 libskk/context.vala
View
13 libskk/context.vala
@@ -539,11 +539,20 @@ namespace Skk {
pop_state ();
state_stack.peek_head ().cancel_okuri ();
}
- // to restore surrounding text after focus change
+
var state = state_stack.peek_head ();
- state.output_surrounding_text ();
+
+ // will clear state.candidates but not state.output
state.reset ();
+
+ // need to manually assign it because
+ // _candidates.candidates may point to a State object different
+ // from state, when dict edit
((ProxyCandidateList) _candidates).candidates = state.candidates;
+
+ // clear output and preedit
+ clear_output ();
+ preedit = "";
}
/**

0 comments on commit 0b362f5

Please sign in to comment.