se

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

line_count.h (580B)


      1 static char* line_count(struct window_buffer* wb, int y, int lines_left, int minx, int maxx, struct glyph* attr)
      2 {
      3 	static char line[LINE_MAX_LEN];
      4 	int tmp, tmp2, cy;
      5 	fb_offset_to_xy(get_fb(wb), wb->cursor_offset, 0, wb->y_scroll, &tmp, &cy, &tmp2);
      6 
      7 	y += wb->y_scroll + 1;
      8 	cy += wb->y_scroll + 1;
      9 
     10 	snprintf(line, LINE_MAX_LEN, "%3d ", y);
     11 
     12 	if (y == cy) {
     13 		attr->fg = yellow;
     14 		attr->bg = alternate_bg_bright;
     15 	}
     16 
     17 	return line;
     18 }
     19 
     20 // add with this:
     21 // char*(*wb_new_line_draw)(struct window_buffer* wb, int y, int lines_left, int minx, int maxx, Glyph* attr) = line_count;