Changeset 22662d7
- Timestamp:
- Feb 4, 2011, 5:33:22 PM (14 years ago)
- Branches:
- release-1.7
- Children:
- 27705b65
- Parents:
- b1ed3e2
- git-author:
- David Benjamin <davidben@mit.edu> (01/25/11 17:27:10)
- git-committer:
- David Benjamin <davidben@mit.edu> (02/04/11 17:33:22)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
fmtext.c
rb1ed3e2 r22662d7 925 925 short i, j; 926 926 927 cpmgr->overflow = false; 927 928 cpmgr->next = 8; 928 929 /* The test is <= because we allocated COLORS+1 entries. */ 929 930 for(i = 0; i <= COLORS; i++) { 930 931 for(j = 0; j <= COLORS; j++) { … … 974 975 /* We still don't have a pair, drop the background color. Too bad. */ 975 976 owl_function_debugmsg("colorpairs: color shortage - dropping background color."); 977 cpmgr->overflow = true; 976 978 pair = owl_fmtext_get_colorpair(fg, OWL_COLOR_DEFAULT); 977 979 } … … 979 981 /* We still don't have a pair, defaults all around. */ 980 982 owl_function_debugmsg("colorpairs: color shortage - dropping foreground and background color."); 983 cpmgr->overflow = true; 981 984 pair = 0; 982 985 } -
mainwin.c
rb1ed3e2 r22662d7 53 53 markedmsgid = owl_global_get_markedmsgid(&g); 54 54 v = owl_global_get_current_view(&g); 55 owl_fmtext_reset_colorpairs(owl_global_get_colorpair_mgr(&g));56 55 57 56 if (v==NULL) { -
owl.c
r337383e r22662d7 444 444 static int owl_refresh_pre_select_action(owl_ps_action *a, void *data) 445 445 { 446 owl_colorpair_mgr *cpmgr; 447 446 448 /* if a resize has been scheduled, deal with it */ 447 449 owl_global_check_resize(&g); 448 450 /* update the terminal if we need to */ 449 451 owl_window_redraw_scheduled(); 452 /* On colorpair shortage, reset and redraw /everything/. NOTE: if 453 * the current screen uses too many colorpairs, this draws 454 * everything twice. But this is unlikely; COLOR_PAIRS is 64 with 455 * 8+1 colors, and 256^2 with 256+1 colors. (+1 for default.) */ 456 cpmgr = owl_global_get_colorpair_mgr(&g); 457 if (cpmgr->overflow) { 458 owl_function_debugmsg("colorpairs: color shortage; reset pairs and redraw. COLOR_PAIRS = %d", COLOR_PAIRS); 459 owl_fmtext_reset_colorpairs(cpmgr); 460 owl_function_full_redisplay(); 461 owl_window_redraw_scheduled(); 462 } 450 463 return 0; 451 464 } -
owl.h
r337383e r22662d7 549 549 int next; 550 550 short **pairs; 551 bool overflow; 551 552 } owl_colorpair_mgr; 552 553
Note: See TracChangeset
for help on using the changeset viewer.