New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insert characters by InputMethod at one time #4594

Closed
wants to merge 3 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@tyfkda
Contributor

tyfkda commented Aug 1, 2016

I think calling insertString for each character is a bit wasteful,
so do it for committed characters at one time.

tyfkda added some commits Jul 30, 2016

Shrink variable scope
Local variable `c` is used only inside the block.
Use `for` statement
to clarify the behavior.
Insert characters by InputMethod at one time
Stop calling `insertString` for each character,
but call it with all committed characters at one time.
@benfry

This comment has been minimized.

Show comment
Hide comment
@benfry

benfry Aug 1, 2016

Member

Thanks, though the impact here is minimal—I think I'm more comfortable with inserting by characters and having the editor update properly than this sequence. However, I've done a little cleanup in the code, since I've not touched it in the past and it doesn't follow our conventions.

Member

benfry commented Aug 1, 2016

Thanks, though the impact here is minimal—I think I'm more comfortable with inserting by characters and having the editor update properly than this sequence. However, I've done a little cleanup in the code, since I've not touched it in the past and it doesn't follow our conventions.

@benfry benfry closed this Aug 1, 2016

@tyfkda tyfkda deleted the tyfkda:feature/insert-string branch Aug 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment