diff options
| author | Kim F. Storm | 2004-08-02 23:42:14 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-08-02 23:42:14 +0000 |
| commit | ed5c373cab5483317a8b6fca3d8d4d52432934fc (patch) | |
| tree | 986ab9435940890e56741ff9b1107ca65ce7e45d | |
| parent | fb8b092b99720c028ecbf48bc9a423024786af86 (diff) | |
| download | emacs-ed5c373cab5483317a8b6fca3d8d4d52432934fc.tar.gz emacs-ed5c373cab5483317a8b6fca3d8d4d52432934fc.zip | |
(compute_motion): Fix check for full width window
in non-window case. Do not count left truncation glyph on
window systems.
| -rw-r--r-- | src/indent.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/indent.c b/src/indent.c index 6cb82c18f04..63f1ed31930 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -1231,6 +1231,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1231 | int prev_vpos = 0; | 1231 | int prev_vpos = 0; |
| 1232 | int contin_hpos; /* HPOS of last column of continued line. */ | 1232 | int contin_hpos; /* HPOS of last column of continued line. */ |
| 1233 | int prev_tab_offset; /* Previous tab offset. */ | 1233 | int prev_tab_offset; /* Previous tab offset. */ |
| 1234 | int continuation_glyph_width; | ||
| 1234 | 1235 | ||
| 1235 | XSETBUFFER (buffer, current_buffer); | 1236 | XSETBUFFER (buffer, current_buffer); |
| 1236 | XSETWINDOW (window, win); | 1237 | XSETWINDOW (window, win); |
| @@ -1259,6 +1260,12 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1259 | width -= 1; | 1260 | width -= 1; |
| 1260 | } | 1261 | } |
| 1261 | 1262 | ||
| 1263 | continuation_glyph_width = 0; | ||
| 1264 | #ifdef HAVE_WINDOW_SYSTEM | ||
| 1265 | if (!FRAME_WINDOW_P (XFRAME (win->frame))) | ||
| 1266 | continuation_glyph_width = 1; | ||
| 1267 | #endif | ||
| 1268 | |||
| 1262 | immediate_quit = 1; | 1269 | immediate_quit = 1; |
| 1263 | QUIT; | 1270 | QUIT; |
| 1264 | 1271 | ||
| @@ -1382,7 +1389,8 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1382 | { | 1389 | { |
| 1383 | if (hscroll | 1390 | if (hscroll |
| 1384 | || (truncate_partial_width_windows | 1391 | || (truncate_partial_width_windows |
| 1385 | && width < FRAME_COLS (XFRAME (WINDOW_FRAME (win)))) | 1392 | && ((width + continuation_glyph_width) |
| 1393 | < FRAME_COLS (XFRAME (WINDOW_FRAME (win))))) | ||
| 1386 | || !NILP (current_buffer->truncate_lines)) | 1394 | || !NILP (current_buffer->truncate_lines)) |
| 1387 | { | 1395 | { |
| 1388 | /* Truncating: skip to newline, unless we are already past | 1396 | /* Truncating: skip to newline, unless we are already past |
| @@ -1666,7 +1674,7 @@ compute_motion (from, fromvpos, fromhpos, did_motion, to, tovpos, tohpos, width, | |||
| 1666 | hpos -= hscroll; | 1674 | hpos -= hscroll; |
| 1667 | /* Count the truncation glyph on column 0 */ | 1675 | /* Count the truncation glyph on column 0 */ |
| 1668 | if (hscroll > 0) | 1676 | if (hscroll > 0) |
| 1669 | hpos++; | 1677 | hpos += continuation_glyph_width; |
| 1670 | tab_offset = 0; | 1678 | tab_offset = 0; |
| 1671 | } | 1679 | } |
| 1672 | contin_hpos = 0; | 1680 | contin_hpos = 0; |