parent
09123ab192
commit
e9f00278cc
|
@ -161,16 +161,15 @@ class Application(object):
|
||||||
self.loadrc()
|
self.loadrc()
|
||||||
|
|
||||||
# initialize our buffers
|
# initialize our buffers
|
||||||
# note that the first buffer in buffers will be initially visible
|
# note that only the first buffer will be initially visible
|
||||||
buffers.append(buffer.about.AboutBuffer())
|
buffers.append(buffer.about.AboutBuffer())
|
||||||
buffers.append(buffer.console.ConsoleBuffer())
|
#buffers.append(buffer.console.ConsoleBuffer())
|
||||||
|
|
||||||
if self.rcerror:
|
if self.rcerror:
|
||||||
buffers.insert(0, buffer.data.DataBuffer('*RcError*', self.rcerror))
|
buffers.insert(0, buffer.data.DataBuffer('*RcError*', self.rcerror))
|
||||||
|
|
||||||
# build windows for our buffers
|
# build windows for our buffers
|
||||||
for b in buffers:
|
for b in buffers:
|
||||||
if b.name() == '*Console*':
|
if b.modename:
|
||||||
window.Window(b, self)
|
window.Window(b, self)
|
||||||
else:
|
else:
|
||||||
window.Window(b, self, mode_name=init_mode)
|
window.Window(b, self, mode_name=init_mode)
|
||||||
|
|
|
@ -44,6 +44,7 @@ class DelMove(object):
|
||||||
# abstract class
|
# abstract class
|
||||||
class Buffer(object):
|
class Buffer(object):
|
||||||
btype = 'generic'
|
btype = 'generic'
|
||||||
|
modename = None
|
||||||
mac_re = re.compile('\r(?!\n)')
|
mac_re = re.compile('\r(?!\n)')
|
||||||
unix_re = re.compile('(?<!\r)\n')
|
unix_re = re.compile('(?<!\r)\n')
|
||||||
win_re = re.compile('\r\n')
|
win_re = re.compile('\r\n')
|
||||||
|
|
|
@ -6,7 +6,10 @@ def none(window):
|
||||||
|
|
||||||
def last_buffer(window):
|
def last_buffer(window):
|
||||||
bl = window.application.bufferlist
|
bl = window.application.bufferlist
|
||||||
|
if bl.hidden_buffers:
|
||||||
return bl.hidden_buffers[0].name()
|
return bl.hidden_buffers[0].name()
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
|
|
||||||
def current_buffer(window):
|
def current_buffer(window):
|
||||||
return window.buffer.name()
|
return window.buffer.name()
|
||||||
|
|
Loading…
Reference in New Issue