diff options
| author | Karl Heuer | 1994-02-14 19:42:30 +0000 |
|---|---|---|
| committer | Karl Heuer | 1994-02-14 19:42:30 +0000 |
| commit | 9f4123325998eb089e8f9faf486cd5ccb76ecf78 (patch) | |
| tree | 579ef346e5e0f00995c325230ee96f0da0a5b02a /src | |
| parent | 7e7a76b5938f813386f098c7d5946de37cf4c341 (diff) | |
| download | emacs-9f4123325998eb089e8f9faf486cd5ccb76ecf78.tar.gz emacs-9f4123325998eb089e8f9faf486cd5ccb76ecf78.zip | |
(try_window_id, display_text_line): Treat blank lines specially in
selective_display.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index d17a43e6408..7fcb800ec3e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -1415,6 +1415,10 @@ try_window_id (window) | |||
| 1415 | register int i, tem; | 1415 | register int i, tem; |
| 1416 | int last_text_vpos = 0; | 1416 | int last_text_vpos = 0; |
| 1417 | int stop_vpos; | 1417 | int stop_vpos; |
| 1418 | int selective | ||
| 1419 | = XTYPE (current_buffer->selective_display) == Lisp_Int | ||
| 1420 | ? XINT (current_buffer->selective_display) | ||
| 1421 | : !NILP (current_buffer->selective_display) ? -1 : 0; | ||
| 1418 | 1422 | ||
| 1419 | struct position val, bp, ep, xp, pp; | 1423 | struct position val, bp, ep, xp, pp; |
| 1420 | int scroll_amount = 0; | 1424 | int scroll_amount = 0; |
| @@ -1467,9 +1471,7 @@ try_window_id (window) | |||
| 1467 | if ((bp.contin && bp.bufpos - 1 == beg_unchanged && vpos > 0) | 1471 | if ((bp.contin && bp.bufpos - 1 == beg_unchanged && vpos > 0) |
| 1468 | || | 1472 | || |
| 1469 | /* Likewise if we have to worry about selective display. */ | 1473 | /* Likewise if we have to worry about selective display. */ |
| 1470 | (XTYPE (current_buffer->selective_display) == Lisp_Int | 1474 | (selective > 0 && bp.bufpos - 1 == beg_unchanged && vpos > 0)) |
| 1471 | && XINT (current_buffer->selective_display) > 0 | ||
| 1472 | && bp.bufpos - 1 == beg_unchanged && vpos > 0)) | ||
| 1473 | { | 1475 | { |
| 1474 | bp = *vmotion (bp.bufpos, -1, width, hscroll, window); | 1476 | bp = *vmotion (bp.bufpos, -1, width, hscroll, window); |
| 1475 | --vpos; | 1477 | --vpos; |
| @@ -1486,11 +1488,8 @@ try_window_id (window) | |||
| 1486 | 1488 | ||
| 1487 | /* Find first visible newline after which no more is changed. */ | 1489 | /* Find first visible newline after which no more is changed. */ |
| 1488 | tem = find_next_newline (Z - max (end_unchanged, Z - ZV), 1); | 1490 | tem = find_next_newline (Z - max (end_unchanged, Z - ZV), 1); |
| 1489 | if (XTYPE (current_buffer->selective_display) == Lisp_Int | 1491 | if (selective > 0) |
| 1490 | && XINT (current_buffer->selective_display) > 0) | 1492 | while (tem < ZV - 1 && (indented_beyond_p (tem, selective))) |
| 1491 | while (tem < ZV - 1 | ||
| 1492 | && (position_indentation (tem) | ||
| 1493 | >= XINT (current_buffer->selective_display))) | ||
| 1494 | tem = find_next_newline (tem, 1); | 1493 | tem = find_next_newline (tem, 1); |
| 1495 | 1494 | ||
| 1496 | /* Compute the cursor position after that newline. */ | 1495 | /* Compute the cursor position after that newline. */ |
| @@ -2123,7 +2122,7 @@ display_text_line (w, start, vpos, hpos, taboffset) | |||
| 2123 | invis = 0; | 2122 | invis = 0; |
| 2124 | while (pos < end | 2123 | while (pos < end |
| 2125 | && selective > 0 | 2124 | && selective > 0 |
| 2126 | && position_indentation (pos + 1) >= selective) | 2125 | && indented_beyond_p (pos + 1, selective)) |
| 2127 | { | 2126 | { |
| 2128 | invis = 1; | 2127 | invis = 1; |
| 2129 | pos = find_next_newline (pos + 1, 1); | 2128 | pos = find_next_newline (pos + 1, 1); |