##// END OF EJS Templates
crecord: fiddle with vertical whitespace
Matt Mackall -
r24317:f559cae7 default
parent child Browse files
Show More
@@ -17,6 +17,7 b' import os, re, sys, fcntl, struct, termi'
17 # This is required for ncurses to display non-ASCII characters in default user
17 # This is required for ncurses to display non-ASCII characters in default user
18 # locale encoding correctly. --immerrr
18 # locale encoding correctly. --immerrr
19 locale.setlocale(locale.LC_ALL, '')
19 locale.setlocale(locale.LC_ALL, '')
20
20 # os.name is one of: 'posix', 'nt', 'dos', 'os2', 'mac', or 'ce'
21 # os.name is one of: 'posix', 'nt', 'dos', 'os2', 'mac', or 'ce'
21 if os.name == 'posix':
22 if os.name == 'posix':
22 import curses
23 import curses
@@ -30,11 +31,8 b' except NameError:'
30 raise util.Abort(
31 raise util.Abort(
31 _('the python curses/wcurses module is not available/installed'))
32 _('the python curses/wcurses module is not available/installed'))
32
33
33
34 _origstdout = sys.__stdout__ # used by gethw()
34 _origstdout = sys.__stdout__ # used by gethw()
35
35
36
37
38 class patchnode(object):
36 class patchnode(object):
39 """abstract class for patch graph nodes
37 """abstract class for patch graph nodes
40 (i.e. patchroot, header, hunk, hunkline)
38 (i.e. patchroot, header, hunk, hunkline)
@@ -455,8 +453,6 b' def filterpatch(ui, chunks, chunk_select'
455
453
456 return appliedhunklist
454 return appliedhunklist
457
455
458
459
460 def gethw():
456 def gethw():
461 """
457 """
462 magically get the current height and width of the window (without initscr)
458 magically get the current height and width of the window (without initscr)
@@ -470,7 +466,6 b' def gethw():'
470 "hhhh", fcntl.ioctl(_origstdout, termios.TIOCGWINSZ, "\000"*8))[0:2]
466 "hhhh", fcntl.ioctl(_origstdout, termios.TIOCGWINSZ, "\000"*8))[0:2]
471 return h, w
467 return h, w
472
468
473
474 def chunkselector(headerlist, ui):
469 def chunkselector(headerlist, ui):
475 """
470 """
476 curses interface to get selection of chunks, and mark the applied flags
471 curses interface to get selection of chunks, and mark the applied flags
General Comments 0
You need to be logged in to leave comments. Login now