Jesse Luehrs <[email protected]> writes:

>> From ab6618459e75aa8c940c0cedeb5c1ba5a43b028a Mon Sep 17 00:00:00 2001
> From: Jesse Luehrs <[email protected]>
> Date: Fri, 25 Sep 2009 02:26:45 -0500
> Subject: [PATCH] handle killing the last buffer a little better

> replace it with an empty buffer if we aren't allowed to kill it

This doesn't seem that useful since the only thing you would do with the
new buffer is use it to browse to a different URL, which you could have
done with the existing buffer anyway.

If this is really desirable behavior, though, you could create a user
variable that enables this behavior when set, but leaves the existing
behavior when unset, as I would want the existing behavior to still be
available.

> ---
>  modules/buffer.js |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)

> diff --git a/modules/buffer.js b/modules/buffer.js
> index 633670a..efa9c08 100644
> --- a/modules/buffer.js
> +++ b/modules/buffer.js
> @@ -605,8 +605,9 @@ function kill_buffer (buffer, force) {
>              delete_window(buffer.window);
>              return;
>          }
> -        else
> -            throw interactive_error("Can't kill last buffer.");
> +        else {
> + create_buffer(buffer.window, buffer_creator(content_buffer),
> OPEN_NEW_BUFFER_BACKGROUND);
> +        }
>      }
>      buffers.kill_buffer(buffer);
>  }
> -- 
> 1.6.4.4


-- 
Jeremy Maitin-Shepard
_______________________________________________
Conkeror mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/conkeror

Reply via email to