forked from emacs-mirror/emacs
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix slow operation of 'string-width'
* src/composite.c (find_automatic_composition): Accept one additional argument BACKLIM; don't look back in buffer or string farther than that. Add an assertion for BACKLIM. (composition_adjust_point, Ffind_composition_internal): Callers adjusted. * src/composite.h (find_automatic_composition): Adjust prototype. * src/character.c (lisp_string_width): Call 'find_automatic_composition' with the value of BACKLIM equal to POS, to avoid costly and unnecessary search back in the string, since those previous characters were already checked for automatic compositions. (Bug#48734) (Bug#48839)
- Loading branch information
1 parent
3eb2947
commit f93f3b8
Showing
3 changed files
with
68 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters