diff options
| author | Chong Yidong | 2008-07-05 18:22:56 +0000 |
|---|---|---|
| committer | Chong Yidong | 2008-07-05 18:22:56 +0000 |
| commit | 29bd139205487792d2f79583195e5560ac65d8c2 (patch) | |
| tree | 43d10eabbbfec8f3b0660d771bc28c96b4c4cc61 /src | |
| parent | 9204cb8b985bac88ff3609368f62f2286e2eea97 (diff) | |
| download | emacs-29bd139205487792d2f79583195e5560ac65d8c2.tar.gz emacs-29bd139205487792d2f79583195e5560ac65d8c2.zip | |
(try_window_id): Give up if word-wrapping is on.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 4b4fd77d280..00bedccd9f8 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -14534,9 +14534,10 @@ find_last_unchanged_at_beg_row (w) | |||
| 14534 | int yb = window_text_bottom_y (w); | 14534 | int yb = window_text_bottom_y (w); |
| 14535 | 14535 | ||
| 14536 | /* Find the last row displaying unchanged text. */ | 14536 | /* Find the last row displaying unchanged text. */ |
| 14537 | row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); | 14537 | for (row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
| 14538 | while (MATRIX_ROW_DISPLAYS_TEXT_P (row) | 14538 | MATRIX_ROW_DISPLAYS_TEXT_P (row) |
| 14539 | && MATRIX_ROW_START_CHARPOS (row) < first_changed_pos) | 14539 | && MATRIX_ROW_START_CHARPOS (row) < first_changed_pos; |
| 14540 | ++row) | ||
| 14540 | { | 14541 | { |
| 14541 | if (/* If row ends before first_changed_pos, it is unchanged, | 14542 | if (/* If row ends before first_changed_pos, it is unchanged, |
| 14542 | except in some case. */ | 14543 | except in some case. */ |
| @@ -14553,10 +14554,8 @@ find_last_unchanged_at_beg_row (w) | |||
| 14553 | row_found = row; | 14554 | row_found = row; |
| 14554 | 14555 | ||
| 14555 | /* Stop if last visible row. */ | 14556 | /* Stop if last visible row. */ |
| 14556 | if (MATRIX_ROW_BOTTOM_Y (row) >= yb) | 14557 | if (MATRIX_ROW_BOTTOM_Y (row) >= yb) |
| 14557 | break; | 14558 | break; |
| 14558 | |||
| 14559 | ++row; | ||
| 14560 | } | 14559 | } |
| 14561 | 14560 | ||
| 14562 | return row_found; | 14561 | return row_found; |
| @@ -14872,6 +14871,12 @@ try_window_id (w) | |||
| 14872 | if (overlay_arrows_changed_p ()) | 14871 | if (overlay_arrows_changed_p ()) |
| 14873 | GIVE_UP (12); | 14872 | GIVE_UP (12); |
| 14874 | 14873 | ||
| 14874 | /* When word-wrap is on, adding a space to the first word of a | ||
| 14875 | wrapped line can change the wrap position, altering the line | ||
| 14876 | above it. It might be worthwhile to handle this more | ||
| 14877 | intelligently, but for now just redisplay from scratch. */ | ||
| 14878 | if (!NILP (XBUFFER (w->buffer)->word_wrap)) | ||
| 14879 | GIVE_UP (21); | ||
| 14875 | 14880 | ||
| 14876 | /* Make sure beg_unchanged and end_unchanged are up to date. Do it | 14881 | /* Make sure beg_unchanged and end_unchanged are up to date. Do it |
| 14877 | only if buffer has really changed. The reason is that the gap is | 14882 | only if buffer has really changed. The reason is that the gap is |