Fossil SCM
Use the absolute value of the -n argument as limit of the initial select when "after" is used so "-n N" with negative N can be use. (especially since the default is -20).
Commit
0d26e8a46fccb53a6c1c52bd704bd1fbcf08679e5cf5de9a99d0adfccd827f7c
Parent
eee36897b637ea8…
1 file changed
+1
-1
+1
-1
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -3752,11 +3752,11 @@ | ||
| 3752 | 3752 | mode==TIMELINE_MODE_PARENTS ) ? "<=" : ">=", zDate /*safe-for-%s*/ |
| 3753 | 3753 | ); |
| 3754 | 3754 | if( mode==TIMELINE_MODE_AFTER ){ |
| 3755 | 3755 | /* Complete the outer above outer select. */ |
| 3756 | 3756 | blob_append_sql(&sql, |
| 3757 | - "\nORDER BY event.mtime LIMIT %d) t ORDER BY t.mDateTime DESC;", n); | |
| 3757 | + "\nORDER BY event.mtime LIMIT abs(%d)) t ORDER BY t.mDateTime DESC;", n); | |
| 3758 | 3758 | } |
| 3759 | 3759 | |
| 3760 | 3760 | /* When zFilePattern is specified, compute complete ancestry; |
| 3761 | 3761 | * limit later at print_timeline() */ |
| 3762 | 3762 | if( mode==TIMELINE_MODE_CHILDREN || mode==TIMELINE_MODE_PARENTS ){ |
| 3763 | 3763 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -3752,11 +3752,11 @@ | |
| 3752 | mode==TIMELINE_MODE_PARENTS ) ? "<=" : ">=", zDate /*safe-for-%s*/ |
| 3753 | ); |
| 3754 | if( mode==TIMELINE_MODE_AFTER ){ |
| 3755 | /* Complete the outer above outer select. */ |
| 3756 | blob_append_sql(&sql, |
| 3757 | "\nORDER BY event.mtime LIMIT %d) t ORDER BY t.mDateTime DESC;", n); |
| 3758 | } |
| 3759 | |
| 3760 | /* When zFilePattern is specified, compute complete ancestry; |
| 3761 | * limit later at print_timeline() */ |
| 3762 | if( mode==TIMELINE_MODE_CHILDREN || mode==TIMELINE_MODE_PARENTS ){ |
| 3763 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -3752,11 +3752,11 @@ | |
| 3752 | mode==TIMELINE_MODE_PARENTS ) ? "<=" : ">=", zDate /*safe-for-%s*/ |
| 3753 | ); |
| 3754 | if( mode==TIMELINE_MODE_AFTER ){ |
| 3755 | /* Complete the outer above outer select. */ |
| 3756 | blob_append_sql(&sql, |
| 3757 | "\nORDER BY event.mtime LIMIT abs(%d)) t ORDER BY t.mDateTime DESC;", n); |
| 3758 | } |
| 3759 | |
| 3760 | /* When zFilePattern is specified, compute complete ancestry; |
| 3761 | * limit later at print_timeline() */ |
| 3762 | if( mode==TIMELINE_MODE_CHILDREN || mode==TIMELINE_MODE_PARENTS ){ |
| 3763 |