Previous Pages

Close Unsplit View

Combining closing und unsplitting a message or error buffer

If you often do an unsplit after closing a message or error buffer you can combine these into one key command in your ~/.textadept/init.lua:

keys.cw = function()
  if buffer._type then
    buffer:close()
    gui.goto_view(-1, false)
    view:unsplit()
  else
    buffer:close()
  end
end

Edited on Monday, March 12th 2012 at 5:08 PM.