91a92
> 
276a278,280
> #define WITH_SYNC 1
> #include "sync.inc"		/* Synchronization. Include - for simplicity */
> 
1454,1457c1458,1477
< static cb_ret_t
< midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm)
< {
<     int i;
---
> static cb_ret_t 
> midnight_callback (struct Dlg_head *h, dlg_msg_t msg, int parm) 
> {     
>     int i;     
>     
> #ifdef WITH_SYNC    
>     if (msg == DLG_INIT) 
> 	if (!(sync_errs[0]||sync_errs[1])) add_hook(&idle_hook,update_hook,&sync_update_flag); /* hook for synchronization */
> 
>     if ((msg == DLG_KEY) || (msg == DLG_HOTKEY_HANDLED) || (msg == DLG_UNHANDLED_KEY)) {
> 	loose_sync ();    	
>     }
> 	
>     if (msg != DLG_IDLE && msg != DLG_INIT) {        
> 	sync_need_panels_redraw = 0;
> 	set_idle_proc (h, 1);	
>     }    
>     
>     if (msg == DLG_END) delete_hook(&idle_hook,update_hook);     
> #endif
1466a1487,1491
> #ifdef WITH_SYNC
> 	sync_setup_panels ();
> 	if (!(sync_errs[0]||sync_errs[1])) 	sync_need_panels_redraw = 1;
> 	else 					sync_need_panels_redraw = 0;
> #endif	
