Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
由于 pyim-cstring-words-at-point 使用 thing-at-point 来获得当前的 word, 然后对其进行分词
但是光标在中英文之间时, thing-at-point 只返回光标右边的字符串,例如 "世界|hello" 返回的是 hello,这个时候调用 pyim-backward-word 只会往左移动一个字符。
同样对于 "hello|世界", thing-at-point 返回的是世界, 这时调用 pyim-backward-word 也只能往左移动一个英文字符。
PR 里新增了两个函数,当光标在中英文之间时临时左移一个字符后再调用 thing-at-point 和 bounds-of-thing-at-point