(self)
Display the editor window and the current contents.
Display the editor window and the current contents.
Display the editor window and the current contents .
def display(self):
        """Display the editor window and the current contents.

        """
        if self.max_text_size == 1:
            s = self.text[0][self.x_offset:(self.x_offset + self.win_size_x)]
            self.stdscr.move(0, 0)
            self.stdscr.clrtoeol()
            if not self.pw_mode:                                                                                                                                           
                self.stdscr.addstr(0, 0, s)
        else:
            s = self.text[self.y_offset:(self.y_offset + self.win_size_y) or 1]
            for y, line in enumerate(s):
                try:
                    self.stdscr.move(y, 0)
                    self.stdscr.clrtoeol()
                    if not self.pw_mode:
                        self.stdscr.addstr(y, 0, line)
                except:
                    self.close()
        self.stdscr.refresh()
        if self.box:
            self.boxscr.refresh()
        self.scr.refresh()
def display ( self ) : if self . max_text_size == 1 : s = self . text [ 0 ] [ self . x_offset : ( self . x_offset + self . win_size_x ) ] self . stdscr . move ( 0 , 0 ) self . stdscr . clrtoeol ( ) if not self . pw_mode : self . stdscr . addstr ( 0 , 0 , s ) else : s = self . text [ self . y_offset : ( self . y_offset + self . win_size_y ) or 1 ] for y , line in enumerate ( s ) : try : self . stdscr . move ( y , 0 ) self . stdscr . clrtoeol ( ) if not self . pw_mode : self . stdscr . addstr ( y , 0 , line ) except : self . close ( ) self . stdscr . refresh ( ) if self . box : self . boxscr . refresh ( ) self . scr . refresh ( )