parent
3d33459c2d
commit
3884d940a3
|
@ -185,14 +185,15 @@ class Application(object):
|
||||||
curses.def_prog_mode()
|
curses.def_prog_mode()
|
||||||
|
|
||||||
def _load_config_defaults(self):
|
def _load_config_defaults(self):
|
||||||
self.config['ignore_suffix'] = ['~', '-']
|
self.config['ignore_suffix'] = ['~', '-']
|
||||||
self.config['error_timeout'] = -1
|
self.config['error_timeout'] = -1
|
||||||
self.config['max_error_len'] = 192
|
self.config['max_error_len'] = 192
|
||||||
self.config['max_num_kills'] = 64
|
self.config['max_num_kills'] = 64
|
||||||
self.config['word_letters'] = string.letters + string.digits
|
self.config['word_letters'] = string.letters + string.digits
|
||||||
self.config['default_color'] = ('default', 'default',)
|
self.config['default_color'] = ('default', 'default',)
|
||||||
self.config['margin'] = 80
|
self.config['margin'] = 80
|
||||||
self.config['margin_color'] = 'blue'
|
self.config['margin_color'] = 'blue'
|
||||||
|
self.config['use_last_replace'] = False
|
||||||
|
|
||||||
def completion_window_is_open(self):
|
def completion_window_is_open(self):
|
||||||
n = self.complete_slot
|
n = self.complete_slot
|
||||||
|
@ -292,9 +293,9 @@ class Application(object):
|
||||||
n = self.bufferlist.add_slot()
|
n = self.bufferlist.add_slot()
|
||||||
self.bufferlist.set_slot(n, b)
|
self.bufferlist.set_slot(n, b)
|
||||||
def remove_slot(self, n):
|
def remove_slot(self, n):
|
||||||
assert len(self.bufferlist.slots) > 1, "oh no you didn't!"
|
slots = self.bufferlist.slots
|
||||||
assert n >= 0 and n < len(self.bufferlist.slots), \
|
assert len(slots) > 1, "oh no you didn't!"
|
||||||
"invalid slot: %r (%r)" % (n, len(self.bufferlist.slots))
|
assert n >= 0 and n < len(slots), "invalid slot %r %r" % (n, len(slots))
|
||||||
self.bufferlist.remove_slot(n)
|
self.bufferlist.remove_slot(n)
|
||||||
if self.active_slot > n:
|
if self.active_slot > n:
|
||||||
self.active_slot = max(0, self.active_slot - 1)
|
self.active_slot = max(0, self.active_slot - 1)
|
||||||
|
@ -306,9 +307,9 @@ class Application(object):
|
||||||
self.remove_slot(0)
|
self.remove_slot(0)
|
||||||
|
|
||||||
def get_window_height_width(self, i):
|
def get_window_height_width(self, i):
|
||||||
assert i >= 0 and i < len(self.bufferlist.slots), \
|
slots = self.bufferlist.slots
|
||||||
"invalid slot: %r" % slotname
|
assert i >= 0 and i < len(slots), "invalid slot: %r" % slotname
|
||||||
slot = self.bufferlist.slots[i]
|
slot = slots[i]
|
||||||
return (slot.height, slot.width)
|
return (slot.height, slot.width)
|
||||||
|
|
||||||
# files and stuff
|
# files and stuff
|
||||||
|
|
Loading…
Reference in New Issue