Remove trailing whitespaces.
This commit is contained in:
parent
310e2cc347
commit
27b3592e16
1 changed files with 899 additions and 899 deletions
|
|
@ -43,7 +43,7 @@ class EditBox(Window):
|
|||
self.__replace_mode=False
|
||||
self.__parent=parent
|
||||
self.__code=code
|
||||
|
||||
|
||||
Window.__init__(self, self.__parent, 1, self.__parent.getmaxyx()[1], self.__parent.getmaxyx()[0]-1,0, code=code)
|
||||
self.update()
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ class EditBox(Window):
|
|||
"""return the text printed on the edit line"""
|
||||
width = self.rWidth - len(self.__header) -1
|
||||
if self.__curs_pos<width:
|
||||
begin = 0
|
||||
begin = 0
|
||||
end = width
|
||||
else:
|
||||
begin = self.__curs_pos-width
|
||||
|
|
@ -71,7 +71,7 @@ class EditBox(Window):
|
|||
Window.update(self)
|
||||
text = self.__getTextToPrint()
|
||||
self.addYXStr(0, 0, text, limit=self.rWidth)
|
||||
|
||||
|
||||
self.noutrefresh()
|
||||
|
||||
def __dec_cur(self):
|
||||
|
|
@ -83,7 +83,7 @@ class EditBox(Window):
|
|||
"""move cursor on the right"""
|
||||
if self.__curs_pos<len(self.__text):
|
||||
self.__curs_pos = self.__curs_pos + 1
|
||||
|
||||
|
||||
def move_cur(self, x):
|
||||
pos = x+len(self.__header)
|
||||
if pos>=self.rWidth:
|
||||
|
|
@ -94,7 +94,7 @@ class EditBox(Window):
|
|||
"""Clear the text of the edit box"""
|
||||
self.__text=""
|
||||
self.__curs_pos=0
|
||||
|
||||
|
||||
def replace_cur(self):
|
||||
"""must be called earch time the cursor is moved"""
|
||||
self.move_cur(self.__curs_pos)
|
||||
|
|
@ -136,7 +136,7 @@ class EditBox(Window):
|
|||
|
||||
elif k==curses.KEY_HOME or k==C('a'):
|
||||
self.__curs_pos=0
|
||||
|
||||
|
||||
elif k==curses.KEY_END or k==C('e'):
|
||||
self.__curs_pos=len(self.__text)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue