mirror of
https://github.com/weechat/weechat.git
synced 2026-07-06 09:43:13 +02:00
core: use an integer for seconds in command /window bare <delay>
This commit is contained in:
@@ -7632,8 +7632,7 @@ command_init ()
|
||||
"for target window)\n"
|
||||
" zoom: zoom on window\n"
|
||||
" bare: toggle bare display (with optional delay in "
|
||||
"seconds, as decimal number, for automatic return to standard "
|
||||
"display mode)\n"
|
||||
"seconds for automatic return to standard display mode)\n"
|
||||
"\n"
|
||||
"For splith and splitv, pct is a percentage which represents size of "
|
||||
"new window, computed with current window as size reference. For "
|
||||
@@ -7650,8 +7649,8 @@ command_init ()
|
||||
" /window scroll -d\n"
|
||||
" zoom on window #2:\n"
|
||||
" /window zoom -window 2\n"
|
||||
" enable bare display for 2.5 seconds:\n"
|
||||
" /window bare 2.5"),
|
||||
" enable bare display for 2 seconds:\n"
|
||||
" /window bare 2"),
|
||||
"list"
|
||||
" || -1 -window %(windows_numbers)"
|
||||
" || +1 -window %(windows_numbers)"
|
||||
|
||||
@@ -2375,7 +2375,7 @@ gui_window_bare_display_timer_cb (void *data, int remaining_calls)
|
||||
void
|
||||
gui_window_bare_display_toggle (const char *delay)
|
||||
{
|
||||
float seconds;
|
||||
long seconds;
|
||||
char *error;
|
||||
|
||||
gui_window_bare_display ^= 1;
|
||||
@@ -2389,7 +2389,7 @@ gui_window_bare_display_toggle (const char *delay)
|
||||
if (delay)
|
||||
{
|
||||
error = NULL;
|
||||
seconds = strtof (delay, &error);
|
||||
seconds = strtol (delay, &error, 10);
|
||||
if (error && !error[0] && (seconds >= 0))
|
||||
{
|
||||
if (gui_window_bare_display_timer)
|
||||
|
||||
Reference in New Issue
Block a user