comparison src/redisplay.c @ 10:49a24b4fd526 r19-15b6

Import from CVS: tag r19-15b6
author cvs
date Mon, 13 Aug 2007 08:47:52 +0200
parents b82b59fe008d
children 0293115a14e9
comparison
equal deleted inserted replaced
9:6f2bbbbbe05a 10:49a24b4fd526
5784 #ifdef MSDOS 5784 #ifdef MSDOS
5785 str = NILP (b->buffer_file_type) ? "T" : "B"; 5785 str = NILP (b->buffer_file_type) ? "T" : "B";
5786 #else /* not MSDOS */ 5786 #else /* not MSDOS */
5787 str = "T"; 5787 str = "T";
5788 #endif /* not MSDOS */ 5788 #endif /* not MSDOS */
5789 break;
5789 5790
5790 /* print percent of buffer above top of window, or Top, Bot or All */ 5791 /* print percent of buffer above top of window, or Top, Bot or All */
5791 case 'p': 5792 case 'p':
5792 { 5793 {
5793 Bufpos pos = marker_position (w->start[type]); 5794 Bufpos pos = marker_position (w->start[type]);
5830 case 'P': 5831 case 'P':
5831 { 5832 {
5832 Bufpos toppos = marker_position (w->start[type]); 5833 Bufpos toppos = marker_position (w->start[type]);
5833 Bufpos botpos = BUF_Z (b) - w->window_end_pos[type]; 5834 Bufpos botpos = BUF_Z (b) - w->window_end_pos[type];
5834 Charcount total = BUF_ZV (b) - BUF_BEGV (b); 5835 Charcount total = BUF_ZV (b) - BUF_BEGV (b);
5836
5837 /* botpos is only accurate as of the last redisplay, so we can
5838 only treat it as a hint. In particular, after erase-buffer,
5839 botpos may be negative. */
5840 if (botpos < toppos)
5841 botpos = toppos;
5835 5842
5836 if (botpos >= BUF_ZV (b)) 5843 if (botpos >= BUF_ZV (b))
5837 { 5844 {
5838 if (toppos <= BUF_BEGV (b)) 5845 if (toppos <= BUF_BEGV (b))
5839 str = "All"; 5846 str = "All";