projects
/
platform
/
upstream
/
libpinyin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e923803
)
update pinyin_choose_candidate
author
Peng Wu
<alexepico@gmail.com>
Tue, 17 Apr 2012 04:46:57 +0000
(12:46 +0800)
committer
Peng Wu
<alexepico@gmail.com>
Tue, 17 Apr 2012 04:46:57 +0000
(12:46 +0800)
src/pinyin.cpp
patch
|
blob
|
history
src/pinyin.h
patch
|
blob
|
history
diff --git
a/src/pinyin.cpp
b/src/pinyin.cpp
index
2b20589
..
2cdd8e9
100644
(file)
--- a/
src/pinyin.cpp
+++ b/
src/pinyin.cpp
@@
-823,7
+823,7
@@
int pinyin_choose_candidate(pinyin_instance_t * instance,
bool retval = context->m_pinyin_lookup->validate_constraint
(instance->m_constraints, instance->m_pinyin_keys) && len;
- return len;
+ return
offset +
len;
}
bool pinyin_clear_constraint(pinyin_instance_t * instance,
diff --git
a/src/pinyin.h
b/src/pinyin.h
index
d4f14ce
..
3ac3aa0
100644
(file)
--- a/
src/pinyin.h
+++ b/
src/pinyin.h
@@
-318,7
+318,7
@@
bool pinyin_get_full_pinyin_candidates(pinyin_instance_t * instance,
* @instance: the pinyin instance.
* @offset: the offset in the pinyin keys.
* @token: the selected candidate.
- * @returns: the c
haracters of
the chosen candidate.
+ * @returns: the c
ursor after
the chosen candidate.
*
* Choose an candidate at the offset.
*