Mercurial > emacs
comparison src/keyboard.c @ 106631:389860cebad8
(command_loop_1): Force redisplay if the last point
was within a composition.
(adjust_point_for_property): Don't adjust point for automatic
composition when called after buffer modification.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 25 Dec 2009 02:41:59 +0000 |
parents | cd4cbab8bb21 |
children | 0d1366f2a045 |
comparison
equal
deleted
inserted
replaced
106630:af4f4af3e19f | 106631:389860cebad8 |
---|---|
1974 finalize: | 1974 finalize: |
1975 | 1975 |
1976 if (current_buffer == prev_buffer | 1976 if (current_buffer == prev_buffer |
1977 && last_point_position != PT | 1977 && last_point_position != PT |
1978 && NILP (Vdisable_point_adjustment) | 1978 && NILP (Vdisable_point_adjustment) |
1979 && NILP (Vglobal_disable_point_adjustment) | 1979 && NILP (Vglobal_disable_point_adjustment)) |
1980 && !already_adjusted) | 1980 { |
1981 adjust_point_for_property (last_point_position, MODIFF != prev_modiff); | 1981 if (composition_adjust_point (last_point_position, |
1982 last_point_position) | |
1983 != last_point_position) | |
1984 /* The last point was temporarily set within a grapheme | |
1985 cluster to prevent automatic composition. To recover | |
1986 the automatic composition, we must update the | |
1987 display. */ | |
1988 windows_or_buffers_changed++; | |
1989 if (!already_adjusted) | |
1990 adjust_point_for_property (last_point_position, | |
1991 MODIFF != prev_modiff); | |
1992 } | |
1982 | 1993 |
1983 /* Install chars successfully executed in kbd macro. */ | 1994 /* Install chars successfully executed in kbd macro. */ |
1984 | 1995 |
1985 if (!NILP (current_kboard->defining_kbd_macro) | 1996 if (!NILP (current_kboard->defining_kbd_macro) |
1986 && NILP (current_kboard->Vprefix_arg)) | 1997 && NILP (current_kboard->Vprefix_arg)) |
2007 int last_pt; | 2018 int last_pt; |
2008 int modified; | 2019 int modified; |
2009 { | 2020 { |
2010 EMACS_INT beg, end; | 2021 EMACS_INT beg, end; |
2011 Lisp_Object val, overlay, tmp; | 2022 Lisp_Object val, overlay, tmp; |
2012 int check_composition = 1, check_display = 1, check_invisible = 1; | 2023 /* When called after buffer modification, we should temporarily |
2024 suppress the point adjustment for automatic composition so that a | |
2025 user can keep inserting another character at point or keep | |
2026 deleting characters around point. */ | |
2027 int check_composition = ! modified, check_display = 1, check_invisible = 1; | |
2013 int orig_pt = PT; | 2028 int orig_pt = PT; |
2014 | 2029 |
2015 /* FIXME: cycling is probably not necessary because these properties | 2030 /* FIXME: cycling is probably not necessary because these properties |
2016 can't be usefully combined anyway. */ | 2031 can't be usefully combined anyway. */ |
2017 while (check_composition || check_display || check_invisible) | 2032 while (check_composition || check_display || check_invisible) |
2018 { | 2033 { |
2019 /* FIXME: check `intangible'. */ | 2034 /* FIXME: check `intangible'. */ |
2020 if (check_composition | 2035 if (check_composition |
2021 && PT > BEGV && PT < ZV | 2036 && PT > BEGV && PT < ZV |
2022 && (beg = composition_adjust_point (last_pt)) != PT) | 2037 && (beg = composition_adjust_point (last_pt, PT)) != PT) |
2023 { | 2038 { |
2024 SET_PT (beg); | 2039 SET_PT (beg); |
2025 check_display = check_invisible = 1; | 2040 check_display = check_invisible = 1; |
2026 } | 2041 } |
2027 check_composition = 0; | 2042 check_composition = 0; |