summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-textwidget.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-06-02 01:49:10 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-06-02 01:49:10 +0000
commit65a6e49964a1764ddcf434eea08f57f82420ac78 (patch)
tree4d0598832668eb35b88aeeda9766c9d74dd7c9f1 /src/fe-text/gui-textwidget.c
parentb9393e864ba5ad87933004203949cfab692d6d72 (diff)
downloadirssi-65a6e49964a1764ddcf434eea08f57f82420ac78.zip
If we used /SB GOTO 23:59 or something, we wanted to jump to
previous day's 23:59 time instead of into future.. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@277 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/gui-textwidget.c')
-rw-r--r--src/fe-text/gui-textwidget.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/fe-text/gui-textwidget.c b/src/fe-text/gui-textwidget.c
index f72229c6..49841479 100644
--- a/src/fe-text/gui-textwidget.c
+++ b/src/fe-text/gui-textwidget.c
@@ -319,6 +319,18 @@ static void cmd_scrollback_goto(gchar *data)
sscanf(arg2, "%d:%d:%d", &tm.tm_hour, &tm.tm_min, &tm.tm_sec);
stamp = mktime(&tm);
+ if (stamp > time(NULL) && arg1 == arg2) {
+ /* we used /SB GOTO 23:59 or something, we want to jump to
+ previous day's 23:59 time instead of into future. */
+ stamp -= 3600*24;
+ }
+
+ if (stamp > time(NULL)) {
+ /* we're still looking into future, don't bother checking */
+ g_free(params);
+ return;
+ }
+
/* find the first line after timestamp */
for (pos = WINDOW_GUI(active_win)->lines; pos != NULL; pos = pos->next)
{