      subroutine update_screen( old_line, old_level )


      include    'swing.cmn'
      include    '($smgdef)'

      integer    old_line, old_level, ii, istat
      integer    sys$setddir


      node_num = node_pointer( cur_level, cur_line )

      call smg$begin_pasteboard_update( board_id )

      call smg$change_rendition( window2, old_line, old_level*17+1,
     .                           1, 12, old_rend )
      call smg$change_rendition( window2, cur_line, cur_level*17+1,
     .                           1, 12,
     .                           smg$m_bold + node(node_num).rend ) 

      call update_window1

      call smg$end_pasteboard_update( board_id )

      if ( cur_line .gt. top_line+lines_per_screen ) then
         top_line = max(1,cur_line-lines_per_screen)

         else if ( cur_line .lt. top_line+2 ) then
         top_line = max(cur_line-2,1)
         end if

      call smg$move_virtual_display( window2, board_id, 4-top_line, 1)

      istat = sys$setddir( node(node_num).spec, %val(0), %val(0) )

      return
      end
