# HG changeset patch # User Karl Heuer # Date 764914087 0 # Node ID c87ae1f141482c247a3cf5da82d7f88b54adf583 # Parent baf8fe0c51e33f88f121f2b42ff8e1f7b691745f (display_text_line): Handle selective display at window edge. diff -r baf8fe0c51e3 -r c87ae1f14148 src/xdisp.c --- a/src/xdisp.c Tue Mar 29 02:20:04 1994 +0000 +++ b/src/xdisp.c Tue Mar 29 04:08:07 1994 +0000 @@ -2262,8 +2262,15 @@ if (pos < ZV) { if (FETCH_CHAR (pos) == '\n') - /* If stopped due to a newline, start next line after it */ - pos++; + { + /* If stopped due to a newline, start next line after it */ + pos++; + /* Check again for hidden lines, in case the newline occurred exactly + at the right margin. */ + while (pos < ZV && selective > 0 + && indented_beyond_p (pos, selective)) + pos = find_next_newline (pos, 1); + } else /* Stopped due to right margin of window */ { @@ -2273,7 +2280,10 @@ /* Truncating => start next line after next newline, and point is on this line if it is before the newline, and skip none of first char of next line */ - pos = find_next_newline (pos, 1); + do + pos = find_next_newline (pos, 1); + while (pos < ZV && selective > 0 + && indented_beyond_p (pos, selective)); val.hpos = XINT (w->hscroll) ? 1 - XINT (w->hscroll) : 0; lastpos = pos - (FETCH_CHAR (pos - 1) == '\n');