diff options
| author | Richard M. Stallman | 1994-05-06 00:48:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-05-06 00:48:26 +0000 |
| commit | 047688cbac14dc76bb4970c8ddefbca1d5a763e3 (patch) | |
| tree | 3fdf4265a5aedc395553a3664ffa9cddbb3a940c /src | |
| parent | c1e6740184ef8e07a50ee54788871d57bf4c142d (diff) | |
| download | emacs-047688cbac14dc76bb4970c8ddefbca1d5a763e3.tar.gz emacs-047688cbac14dc76bb4970c8ddefbca1d5a763e3.zip | |
(last_point_position_buffer): New variable.
(command_loop_1): Set it.
(make_lispy_movement): Don't call pixel_to_glyph_coords if FRAME is 0.
Diffstat (limited to 'src')
| -rw-r--r-- | src/keyboard.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/keyboard.c b/src/keyboard.c index 561e77a8c1e..94cbb26464e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -235,6 +235,9 @@ Lisp_Object this_command; | |||
| 235 | /* The value of point when the last command was executed. */ | 235 | /* The value of point when the last command was executed. */ |
| 236 | int last_point_position; | 236 | int last_point_position; |
| 237 | 237 | ||
| 238 | /* The buffer that was current when the last command was started. */ | ||
| 239 | Lisp_Object last_point_position_buffer; | ||
| 240 | |||
| 238 | #ifdef MULTI_FRAME | 241 | #ifdef MULTI_FRAME |
| 239 | /* The frame in which the last input event occurred, or Qmacro if the | 242 | /* The frame in which the last input event occurred, or Qmacro if the |
| 240 | last event came from a macro. We use this to determine when to | 243 | last event came from a macro. We use this to determine when to |
| @@ -1048,6 +1051,7 @@ command_loop_1 () | |||
| 1048 | prev_buffer = current_buffer; | 1051 | prev_buffer = current_buffer; |
| 1049 | prev_modiff = MODIFF; | 1052 | prev_modiff = MODIFF; |
| 1050 | last_point_position = PT; | 1053 | last_point_position = PT; |
| 1054 | XSET (last_point_position_buffer, Lisp_Buffer, prev_buffer); | ||
| 1051 | 1055 | ||
| 1052 | /* Execute the command. */ | 1056 | /* Execute the command. */ |
| 1053 | 1057 | ||
| @@ -2767,10 +2771,12 @@ make_lispy_movement (frame, bar_window, part, x, y, time) | |||
| 2767 | Lisp_Object posn; | 2771 | Lisp_Object posn; |
| 2768 | int column, row; | 2772 | int column, row; |
| 2769 | 2773 | ||
| 2770 | pixel_to_glyph_coords (frame, XINT (x), XINT (y), &column, &row, 0, 1); | ||
| 2771 | |||
| 2772 | if (frame) | 2774 | if (frame) |
| 2773 | window = window_from_coordinates (frame, column, row, &area); | 2775 | { |
| 2776 | /* It's in a frame; which window on that frame? */ | ||
| 2777 | pixel_to_glyph_coords (frame, XINT (x), XINT (y), &column, &row, 0, 1); | ||
| 2778 | window = window_from_coordinates (frame, column, row, &area); | ||
| 2779 | } | ||
| 2774 | else | 2780 | else |
| 2775 | window = Qnil; | 2781 | window = Qnil; |
| 2776 | 2782 | ||