File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -636,12 +636,15 @@ def get_key(self):
636636 if key :
637637 return key
638638 else :
639- t = time .time ()
640- self .paste_mode = (
641- t - self .last_key_press <= self .config .paste_time
642- )
643- self .last_key_press = t
644- return key
639+ if key != '\x00 ' :
640+ t = time .time ()
641+ self .paste_mode = (
642+ t - self .last_key_press <= self .config .paste_time
643+ )
644+ self .last_key_press = t
645+ return key
646+ else :
647+ key = ''
645648 finally :
646649 if self .idle :
647650 self .idle (self )
@@ -1687,7 +1690,7 @@ def sigwinch(unused_scr):
16871690def sigcont (unused_scr ):
16881691 sigwinch (unused_scr )
16891692 # Forces the redraw
1690- curses .ungetch ('' )
1693+ curses .ungetch ('\x00 ' )
16911694
16921695def gethw ():
16931696 """I found this code on a usenet post, and snipped out the bit I needed,
@@ -1744,7 +1747,10 @@ def idle(caller):
17441747 caller .scr .nodelay (True )
17451748 key = caller .scr .getch ()
17461749 caller .scr .nodelay (False )
1747- curses .ungetch (key )
1750+ if key != - 1 :
1751+ curses .ungetch (key )
1752+ else :
1753+ curses .ungetch ('\x00 ' )
17481754 caller .statusbar .check ()
17491755 caller .check ()
17501756
You can’t perform that action at this time.
0 commit comments