Page 1 of 1

Is it possible to scroll log window?

Posted: Thu Mar 10, 2011 5:08 am
by Postman
Subj.

Re: Is it possible to scroll log window?

Posted: Thu Mar 10, 2011 8:30 am
by Grey
Yep, but only with a scrollwheel on a mouse.

Re: Is it possible to scroll log window?

Posted: Thu Mar 10, 2011 9:58 am
by Postman
Can not be redefined in key bindings?

Re: Is it possible to scroll log window?

Posted: Thu Mar 10, 2011 1:42 pm
by greycat
People like me who do not have a scroll-mouse are SOL there.

Actually, what I do is edit src/main.c and make sure buffering is set to line mode, not the default block mode. And capture the log (stdout) to a file. And then if I need to look back at what the hell just happened, I can look in the file.

Works for in-game chat, too. With line-mode buffering and a stdout log file, you can use tail -f | grep to get the chat output in a separate window.

Re: Is it possible to scroll log window?

Posted: Thu Mar 10, 2011 3:16 pm
by hops
greycat wrote: Actually, what I do is edit src/main.c and make sure buffering is set to line mode, not the default block mode.
greycat, can you please post the lines you edited, or the diff? I tried to collect the outputs in a named-pipe, but the I think buffering is performed in a annoying manner. Thanks.

Re: Is it possible to scroll log window?

Posted: Thu Mar 10, 2011 3:19 pm
by darkgod
Next beta adds a command line parameters to enabled line buffering

Re: Is it possible to scroll log window?

Posted: Thu Mar 10, 2011 6:44 pm
by greycat
Something like this, but it may not apply cleanly, because I had to add the comments back in manually to generate the diff....

Code: Select all

--- src/main.c.orig	2011-03-10 13:42:06.000000000 -0500
+++ src/main.c	2011-03-10 13:41:58.000000000 -0500
@@ -803,7 +803,7 @@
 	init_gen_rand(time(NULL));
 
 	// Change to line buffering
-//	setvbuf(stdout, (char *) NULL, _IOLBF, 0);
+	setvbuf(stdout, (char *) NULL, _IOLBF, 0);
 
 	// Parse arguments
 	int i;
A better diff might be "uncomment the setvbuf line". ;)

Re: Is it possible to scroll log window?

Posted: Fri Mar 11, 2011 6:39 pm
by hops
Thanks, darkgod and greycat.