Differences From Artifact [0c467c67e8]:
- File src/search.c — part of check-in [fa6ece72b6] at 2014-04-23 14:14:06 on branch trunk — Add option -W|--width to "[/help?cmd=stash|fossil stash ls]" and "[/help?cmd=leaves|fossil leaves]" commands. (user: jan.nijtmans size: 6852) [more...]
To Artifact [a8638de188]:
- File src/search.c — part of check-in [c4891e24af] at 2014-06-13 14:21:54 on branch autoadjust — Auto-adjust the width of timeline (and various other output places) according to real terminal width. Suggested by Baptiste Daroussin. (user: jan.nijtmans size: 6957)
| ︙ | |||
200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 | 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 | + + + + + + |
int width;
if( zWidth ){
width = atoi(zWidth);
if( (width!=0) && (width<=20) ){
fossil_fatal("-W|--width value must be >20 or 0");
}
}else{
#ifdef TIOCGWINSZ
struct winsize w;
ioctl(0, TIOCGWINSZ, &w);
width = w.ws_col;
#else
width = 79;
#endif
}
db_must_be_within_tree();
if( g.argc<2 ) return;
blob_init(&pattern, g.argv[2], -1);
for(i=3; i<g.argc; i++){
blob_appendf(&pattern, " %s", g.argv[i]);
|
| ︙ |