mirror of
https://github.com/irssi/irssi.git
synced 2026-08-10 20:33:46 +02:00
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
This commit is contained in:
parent
b9393e864b
commit
65a6e49964
1 changed files with 12 additions and 0 deletions
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue