diff options
| author | Jim Blandy | 1992-08-29 02:55:05 +0000 |
|---|---|---|
| committer | Jim Blandy | 1992-08-29 02:55:05 +0000 |
| commit | 648fa17da60726950f3b318c4d55643ed44d54c8 (patch) | |
| tree | 5e4ef4c5df63c9fed44d0f62496c34f7d0c8d52b /src | |
| parent | 3f5fcd47341a31352fd8e3da25c8c12b96ad9a27 (diff) | |
| download | emacs-648fa17da60726950f3b318c4d55643ed44d54c8.tar.gz emacs-648fa17da60726950f3b318c4d55643ed44d54c8.zip | |
* dispnew.c: Incude "systty.h", not "systerm.h".
* dispnew.c (update_frame): Change the way we handle
cursor_in_echo_area. Firstly, ignore this if the frame we're
updating doesn't have a minibuffer. Secondly, don't handle the
selected frame specially. Thirdly, don't assume that the
minibuffer is only one line high. If cursor_in_echo_area < 0, put
the cursor in the upper-left corner; if cursor_in_echo_area > 0,
put it on the lowest non-empty line in the minibuffer window, or
on the top line.
* dispnew.c (direct_output_for_insert): Fail if
cursor_in_echo_area is set; we don't want to do the typing there.
(direct_output_for_insert): Same.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dispnew.c | 49 |
1 files changed, 37 insertions, 12 deletions
diff --git a/src/dispnew.c b/src/dispnew.c index ea1f64434ab..9bfeb0505ca 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -36,7 +36,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ | |||
| 36 | #include "disptab.h" | 36 | #include "disptab.h" |
| 37 | #include "indent.h" | 37 | #include "indent.h" |
| 38 | 38 | ||
| 39 | #include "systerm.h" | 39 | #include "systty.h" |
| 40 | #include "systime.h" | 40 | #include "systime.h" |
| 41 | 41 | ||
| 42 | #ifdef HAVE_X_WINDOWS | 42 | #ifdef HAVE_X_WINDOWS |
| @@ -874,6 +874,7 @@ direct_output_for_insert (g) | |||
| 874 | || (XINT (w->hscroll) && hpos == XFASTINT (w->left)) | 874 | || (XINT (w->hscroll) && hpos == XFASTINT (w->left)) |
| 875 | 875 | ||
| 876 | /* Give up if cursor outside window (in minibuf, probably) */ | 876 | /* Give up if cursor outside window (in minibuf, probably) */ |
| 877 | || cursor_in_echo_area | ||
| 877 | || FRAME_CURSOR_Y (frame) < XFASTINT (w->top) | 878 | || FRAME_CURSOR_Y (frame) < XFASTINT (w->top) |
| 878 | || FRAME_CURSOR_Y (frame) >= XFASTINT (w->top) + XFASTINT (w->height) | 879 | || FRAME_CURSOR_Y (frame) >= XFASTINT (w->top) + XFASTINT (w->height) |
| 879 | 880 | ||
| @@ -922,7 +923,8 @@ direct_output_forward_char (n) | |||
| 922 | && (FRAME_CURSOR_X (frame) + 1 | 923 | && (FRAME_CURSOR_X (frame) + 1 |
| 923 | >= (XFASTINT (w->left) + XFASTINT (w->width) | 924 | >= (XFASTINT (w->left) + XFASTINT (w->width) |
| 924 | - (XFASTINT (w->width) < FRAME_WIDTH (frame)) | 925 | - (XFASTINT (w->width) < FRAME_WIDTH (frame)) |
| 925 | - 1)))) | 926 | - 1))) |
| 927 | || cursor_in_echo_area) | ||
| 926 | return 0; | 928 | return 0; |
| 927 | 929 | ||
| 928 | FRAME_CURSOR_X (frame) += n; | 930 | FRAME_CURSOR_X (frame) += n; |
| @@ -1052,18 +1054,41 @@ update_frame (f, force, inhibit_hairy_id) | |||
| 1052 | /* Now just clean up termcap drivers and set cursor, etc. */ | 1054 | /* Now just clean up termcap drivers and set cursor, etc. */ |
| 1053 | if (!pause) | 1055 | if (!pause) |
| 1054 | { | 1056 | { |
| 1055 | if (cursor_in_echo_area) | 1057 | if (cursor_in_echo_area |
| 1058 | && FRAME_HAS_MINIBUF_P (f)) | ||
| 1056 | { | 1059 | { |
| 1057 | if (f == selected_frame | 1060 | int top = XINT (XWINDOW (FRAME_MINIBUF_WINDOW (f))->top); |
| 1058 | && cursor_in_echo_area < 0) | 1061 | int row, col; |
| 1059 | cursor_to (FRAME_HEIGHT (f) - 1, 0); | 1062 | |
| 1060 | else if (f == selected_frame | 1063 | if (cursor_in_echo_area < 0) |
| 1061 | && ! current_frame->enable[FRAME_HEIGHT (f) - 1]) | 1064 | { |
| 1062 | cursor_to (FRAME_HEIGHT (f) - 1, 0); | 1065 | row = top; |
| 1066 | col = 0; | ||
| 1067 | } | ||
| 1063 | else | 1068 | else |
| 1064 | cursor_to (FRAME_HEIGHT (f) - 1, | 1069 | { |
| 1065 | min (FRAME_WIDTH (f) - 1, | 1070 | /* If the minibuffer is several lines high, find the last |
| 1066 | current_frame->used[FRAME_HEIGHT (f) - 1])); | 1071 | line that has any text on it. */ |
| 1072 | row = FRAME_HEIGHT (f); | ||
| 1073 | do | ||
| 1074 | { | ||
| 1075 | row--; | ||
| 1076 | if (current_frame->enable[row]) | ||
| 1077 | col = current_frame->used[row]; | ||
| 1078 | else | ||
| 1079 | col = 0; | ||
| 1080 | } | ||
| 1081 | while (row > top && col == 0); | ||
| 1082 | |||
| 1083 | if (col >= FRAME_WIDTH (f)) | ||
| 1084 | { | ||
| 1085 | col = 0; | ||
| 1086 | if (row < FRAME_HEIGHT (f) - 1) | ||
| 1087 | row++; | ||
| 1088 | } | ||
| 1089 | } | ||
| 1090 | |||
| 1091 | cursor_to (row, col); | ||
| 1067 | } | 1092 | } |
| 1068 | else | 1093 | else |
| 1069 | cursor_to (FRAME_CURSOR_Y (f), max (min (FRAME_CURSOR_X (f), | 1094 | cursor_to (FRAME_CURSOR_Y (f), max (min (FRAME_CURSOR_X (f), |