@@ -392,7 +392,6 @@ def getHoveredFiles(self):
392392 if index == self .hoverIndex ]
393393
394394 def showAndGetCommand (self ):
395- self .stdscr .attrset (0 )
396395 fileObjs = self .getFilesToUse ()
397396 files = [fileObj .getFile () for fileObj in fileObjs ]
398397 (maxy , maxx ) = self .getScreenDimensions ()
@@ -409,26 +408,26 @@ def showAndGetCommand(self):
409408 # first lets print all the files
410409 startHeight = halfHeight - 1 - len (files )
411410 try :
412- self .stdscr .addstr (startHeight - 3 , 0 , borderLine )
413- self .stdscr .addstr (startHeight - 2 , 0 , SHORT_FILES_HEADER )
414- self .stdscr .addstr (startHeight - 1 , 0 , borderLine )
411+ self .colorPrinter .addstr (startHeight - 3 , 0 , borderLine )
412+ self .colorPrinter .addstr (startHeight - 2 , 0 , SHORT_FILES_HEADER )
413+ self .colorPrinter .addstr (startHeight - 1 , 0 , borderLine )
415414 for index , file in enumerate (files ):
416- self .stdscr .addstr (startHeight + index , 0 ,
417- file [0 :maxFileLength ])
415+ self .colorPrinter .addstr (startHeight + index , 0 ,
416+ file [0 :maxFileLength ])
418417 except curses .error :
419418 pass
420419
421420 # first print prompt
422421 try :
423- self .stdscr .addstr (halfHeight , 0 , SHORT_COMMAND_PROMPT )
424- self .stdscr .addstr (halfHeight + 1 , 0 , SHORT_COMMAND_PROMPT2 )
422+ self .colorPrinter .addstr (halfHeight , 0 , SHORT_COMMAND_PROMPT )
423+ self .colorPrinter .addstr (halfHeight + 1 , 0 , SHORT_COMMAND_PROMPT2 )
425424 except curses .error :
426425 pass
427426 # then line to distinguish and prompt line
428427 try :
429- self .stdscr .addstr (halfHeight - 1 , 0 , borderLine )
430- self .stdscr .addstr (halfHeight + 2 , 0 , borderLine )
431- self .stdscr .addstr (halfHeight + 3 , 0 , promptLine )
428+ self .colorPrinter .addstr (halfHeight - 1 , 0 , borderLine )
429+ self .colorPrinter .addstr (halfHeight + 2 , 0 , borderLine )
430+ self .colorPrinter .addstr (halfHeight + 3 , 0 , promptLine )
432431 except curses .error :
433432 pass
434433
0 commit comments