Mercurial > emacs
comparison src/xdisp.c @ 5942:c51e1ff87656
(try_window_id, display_text_line): Treat blank lines specially in
selective_display.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Mon, 14 Feb 1994 19:42:30 +0000 |
parents | 18c152c31e66 |
children | ab1aef4b0e07 |
comparison
equal
deleted
inserted
replaced
5941:c4cceb65fc5a | 5942:c51e1ff87656 |
---|---|
1413 int lmargin = hscroll > 0 ? 1 - hscroll : 0; | 1413 int lmargin = hscroll > 0 ? 1 - hscroll : 0; |
1414 register int vpos; | 1414 register int vpos; |
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; |
1421 int delta; | 1425 int delta; |
1422 int tab_offset, epto; | 1426 int tab_offset, epto; |
1465 really start with previous frame line, in case it was not | 1469 really start with previous frame line, in case it was not |
1466 continued when last redisplayed */ | 1470 continued when last redisplayed */ |
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; |
1476 pos = bp.bufpos; | 1478 pos = bp.bufpos; |
1477 } | 1479 } |
1484 | 1486 |
1485 bp.vpos = vpos; | 1487 bp.vpos = vpos; |
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. */ |
1497 ep = *compute_motion (pos, vpos, val.hpos, tem, | 1496 ep = *compute_motion (pos, vpos, val.hpos, tem, |
1498 height, - (1 << (SHORTBITS - 1)), | 1497 height, - (1 << (SHORTBITS - 1)), |
2121 else if (c == '\n') | 2120 else if (c == '\n') |
2122 { | 2121 { |
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); |
2130 if (FETCH_CHAR (pos - 1) == '\n') | 2129 if (FETCH_CHAR (pos - 1) == '\n') |
2131 pos--; | 2130 pos--; |