parent
d4ebbaf5c9
commit
3512296eb8
|
@ -405,10 +405,12 @@ class Application(object):
|
||||||
return self.mini_buffer is not None
|
return self.mini_buffer is not None
|
||||||
def open_mini_buffer(self, prompt, cb, method=None, tabber=None,
|
def open_mini_buffer(self, prompt, cb, method=None, tabber=None,
|
||||||
modename=None, startvalue=None, queue='default'):
|
modename=None, startvalue=None, queue='default'):
|
||||||
|
parentw = self.bufferlist.slots[self.active_slot].window
|
||||||
if self.mini_buffer_is_open():
|
if self.mini_buffer_is_open():
|
||||||
self.close_mini_buffer()
|
self.close_mini_buffer()
|
||||||
self.mini_prompt = prompt
|
self.mini_prompt = prompt
|
||||||
self.mini_buffer = MiniBuffer(cb, self, method, tabber, modename, queue)
|
self.mini_buffer = MiniBuffer(cb, self, method, tabber, modename, queue,
|
||||||
|
parentw)
|
||||||
try:
|
try:
|
||||||
w = self.x - 1 - len(self.mini_prompt) - 1
|
w = self.x - 1 - len(self.mini_prompt) - 1
|
||||||
window.Window(self.mini_buffer, self, height=1, width=w)
|
window.Window(self.mini_buffer, self, height=1, width=w)
|
||||||
|
|
|
@ -14,7 +14,7 @@ class MiniBuffer(buffer.Buffer):
|
||||||
return mini
|
return mini
|
||||||
# the callback function should take one argument (window)
|
# the callback function should take one argument (window)
|
||||||
def __init__(self, func, app, method=None, tabber=None, modename=None,
|
def __init__(self, func, app, method=None, tabber=None, modename=None,
|
||||||
queue=None):
|
queue=None, parentw=None):
|
||||||
buffer.Buffer.__init__(self)
|
buffer.Buffer.__init__(self)
|
||||||
self.app = app
|
self.app = app
|
||||||
self.callback = func
|
self.callback = func
|
||||||
|
@ -22,6 +22,7 @@ class MiniBuffer(buffer.Buffer):
|
||||||
self.tabber = tabber
|
self.tabber = tabber
|
||||||
self.modename = modename
|
self.modename = modename
|
||||||
self.queue = queue
|
self.queue = queue
|
||||||
|
self.parentw = parentw
|
||||||
|
|
||||||
def name(self):
|
def name(self):
|
||||||
return "*Minibuffer*"
|
return "*Minibuffer*"
|
||||||
|
|
Loading…
Reference in New Issue