about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorRaphael Graf <r@undefined.ch>2011-06-01 13:10:50 +0000
committerRaphael Graf <r@undefined.ch>2011-06-01 13:10:50 +0000
commitf779fc4d08ee21fe89579789476c1e557749f1a6 (patch)
tree77fbb6d3ddd1c93f30c1bff4b901fa82016dd293
parent1052c5b0cb23868a4728f2f1a59e718cd4e00a61 (diff)
downloadxombrero-f779fc4d08ee21fe89579789476c1e557749f1a6.tar.gz
Fix bugs in previous commit.
-rw-r--r--xxxterm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xxxterm.c b/xxxterm.c
index b955fba..7e2d809 100644
--- a/xxxterm.c
+++ b/xxxterm.c
@@ -542,6 +542,8 @@ void		walk_js_wl(struct settings *, void (*)(struct settings *, char *, void *),
 void		walk_kb(struct settings *, void (*)(struct settings *, char *, void *), void *);
 void		walk_mime_type(struct settings *, void (*)(struct settings *, char *, void *), void *);
 
+void		recalc_tabs(void);
+
 struct special {
 	int		(*set)(struct settings *, char *);
 	char		*(*get)(struct settings *);
@@ -3704,6 +3706,7 @@ tabaction(struct tab *t, struct karg *args)
 			TAILQ_FOREACH(tt, &tabs, entry)
 				if (tt->tab_id == args->p - 1) {
 					delete_tab(tt);
+					recalc_tabs();
 					break;
 				}
 		break;
@@ -6745,7 +6748,7 @@ execute_cmd:
 	}
 	if (cmd->type > 1)
 		arg.s = last ? g_strdup(last) : g_strdup("");
-	if (cmd->type & XT_INTARG && last) {
+	if (cmd->type & XT_INTARG && last && strlen(last) > 0) {
 		arg.p = atoi(arg.s);
 		if (arg.p <= 0) {
 			if (arg.s[0]=='0')