parent
35f9a6601b
commit
9adcf939e9
|
@ -57,8 +57,11 @@ class KillBuffer(Method):
|
|||
dv=default.current_buffer, h="name of the buffer to kill")]
|
||||
def _execute(self, w, **vargs):
|
||||
name = vargs['buffername']
|
||||
a = w.application
|
||||
assert name in a.bufferlist.buffer_names, "Buffer %r does not exist" % name
|
||||
a = w.application
|
||||
if name not in a.bufferlist.buffer_names:
|
||||
raise Exception("Buffer %r does not exist" % name)
|
||||
elif len(a.bufferlist.buffers) == 1:
|
||||
raise Exception("Can't close only open buffer")
|
||||
self._to_kill = a.bufferlist.buffer_names[name]
|
||||
self._old_window = w
|
||||
if self.force or not self._to_kill.changed():
|
||||
|
|
|
@ -461,8 +461,7 @@ class Fundamental(Handler):
|
|||
if DEBUG:
|
||||
raise
|
||||
else:
|
||||
err = "%s in mode '%s'" % (e, self.name)
|
||||
self.window.set_error(err)
|
||||
self.window.set_error(str(e))
|
||||
|
||||
def region_added(self, p, newlines):
|
||||
mname = self.name
|
||||
|
|
Loading…
Reference in New Issue