Changeset 6eb3ed9


Ignore:
Timestamp:
May 30, 2011, 7:43:13 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
8ffa264
Parents:
6476c0e
git-author:
Jason Gross <jgross@mit.edu> (03/26/11 04:37:52)
git-committer:
Anders Kaseorg <andersk@mit.edu> (05/30/11 19:43:13)
Message:
Show how far you are in a long message

Addresses most of ticket #119 - it shows how far you are in a long
message, but not in a message that you're typing.  The display style
I've somewhat arbitrarily chosen is to replace <truncated> with
<truncated: $num_lines_through/$total_lines>.

Additionally, the <truncated> part of sepbar has been moved to be next
to 'SCROLL', which it is most similar to.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • sepbar.c

    r044f19f r6eb3ed9  
    1616  int x, y, i;
    1717  const char *foo, *appendtosepbar;
     18  int cur_numlines, cur_totallines;
    1819
    1920  ml=owl_global_get_msglist(&g);
     
    5051      wattron(sepwin, A_REVERSE);
    5152
    52   if (owl_mainwin_is_curmsg_truncated(owl_global_get_mainwin(&g))) {
    53     getyx(sepwin, y, x);
    54     wmove(sepwin, y, x+2);
    55     wattron(sepwin, A_BOLD);
    56     waddstr(sepwin, " <truncated> ");
    57     wattroff(sepwin, A_BOLD);
    58   }
    59 
    6053  i=owl_mainwin_get_last_msg(owl_global_get_mainwin(&g));
    6154  if ((i != -1) &&
     
    9083  }
    9184
     85  if (owl_mainwin_is_curmsg_truncated(owl_global_get_mainwin(&g))) {
     86    getyx(sepwin, y, x);
     87    wmove(sepwin, y, x+2);
     88    wattron(sepwin, A_BOLD);
     89    cur_numlines = owl_global_get_curmsg_vert_offset(&g) + 1;
     90    cur_totallines = owl_message_get_numlines(owl_view_get_element(v, owl_global_get_curmsg(&g)));
     91    wprintw(sepwin, " <truncated: %d/%d> ", cur_numlines, cur_totallines);
     92    wattroff(sepwin, A_BOLD);
     93  }
     94
    9295  if (owl_global_get_curmsg_vert_offset(&g)) {
    9396    getyx(sepwin, y, x);
Note: See TracChangeset for help on using the changeset viewer.