equal
deleted
inserted
replaced
20 encoding, |
20 encoding, |
21 error, |
21 error, |
22 patch as patchmod, |
22 patch as patchmod, |
23 scmutil, |
23 scmutil, |
24 util, |
24 util, |
|
25 ) |
|
26 from .utils import ( |
|
27 stringutil, |
25 ) |
28 ) |
26 stringio = util.stringio |
29 stringio = util.stringio |
27 |
30 |
28 # This is required for ncurses to display non-ASCII characters in default user |
31 # This is required for ncurses to display non-ASCII characters in default user |
29 # locale encoding correctly. --immerrr |
32 # locale encoding correctly. --immerrr |
583 |
586 |
584 # Honor color setting of ui section. Keep colored setup as |
587 # Honor color setting of ui section. Keep colored setup as |
585 # long as not explicitly set to a falsy value - especially, |
588 # long as not explicitly set to a falsy value - especially, |
586 # when not set at all. This is to stay most compatible with |
589 # when not set at all. This is to stay most compatible with |
587 # previous (color only) behaviour. |
590 # previous (color only) behaviour. |
588 uicolor = util.parsebool(self.ui.config('ui', 'color')) |
591 uicolor = stringutil.parsebool(self.ui.config('ui', 'color')) |
589 self.usecolor = uicolor is not False |
592 self.usecolor = uicolor is not False |
590 |
593 |
591 # the currently selected header, hunk, or hunk-line |
594 # the currently selected header, hunk, or hunk-line |
592 self.currentselecteditem = self.headerlist[0] |
595 self.currentselecteditem = self.headerlist[0] |
593 |
596 |
1056 lines[-1] += sep + s |
1059 lines[-1] += sep + s |
1057 lastwidth += w + len(sep) |
1060 lastwidth += w + len(sep) |
1058 if len(lines) != self.numstatuslines: |
1061 if len(lines) != self.numstatuslines: |
1059 self.numstatuslines = len(lines) |
1062 self.numstatuslines = len(lines) |
1060 self.statuswin.resize(self.numstatuslines, self.xscreensize) |
1063 self.statuswin.resize(self.numstatuslines, self.xscreensize) |
1061 return [util.ellipsis(l, self.xscreensize - 1) for l in lines] |
1064 return [stringutil.ellipsis(l, self.xscreensize - 1) for l in lines] |
1062 |
1065 |
1063 def updatescreen(self): |
1066 def updatescreen(self): |
1064 self.statuswin.erase() |
1067 self.statuswin.erase() |
1065 self.chunkpad.erase() |
1068 self.chunkpad.erase() |
1066 |
1069 |