~slowjo

~slowjo/public-inbox

Last active 1 year, 22 days ago
View more

Recent activity

[PATCH senpai] docs: update Ctrl-C behaviour 5 months ago

From Jonathan Halmen to ~taiite/public-inbox

this behaviour was changed back in
c078fbbb029fd248756ea5d7726f9ae6090a4ee3
---
seems like i haven't updated senpai in a while, this new behaviour
confused me today

 doc/senpai.1.scd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/senpai.1.scd b/doc/senpai.1.scd
index 81e3544..76fee8a 100644
--- a/doc/senpai.1.scd
+++ b/doc/senpai.1.scd
@@ -66,7 +66,7 @@ of messages are in the timeline:
[message trimmed]

Re: [PATCH] keybindings: add shift as possible modifier 7 months ago

From Jonathan Halmen to ~sircmpwn/visurf-devel

> This breaks bindings with capital letters in them. Maybe we should
> rewrite A to S-A? Not sure on that, especially since we'd also want to
> rewrite S-A back to A in keybuf_to_str.

Oh right I missed that, was blinded by how easy it seemed to be to add
this functionality. I don't have enough insight into how all of this
works yet to have an opinion on how to fix this.
If someone shows up and decides how to do this before I form an opinion
I'd be happy to take a stab at it anyway.

[PATCH] keybindings: add shift as possible modifier 7 months ago

From Jonathan Halmen to ~sircmpwn/visurf-devel

this makes it possible to bind <S-space>
---
 frontends/visurf/keybindings.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/frontends/visurf/keybindings.c b/frontends/visurf/keybindings.c
index 53af3fd6a..e51e4e11c 100644
--- a/frontends/visurf/keybindings.c
+++ b/frontends/visurf/keybindings.c
@@ -13,6 +13,7 @@ struct mod_map {
};

static const struct mod_map mod_map[] = {
	{ XKB_MOD_NAME_SHIFT, MOD_SHIFT },
[message trimmed]

[PATCH] window: only reformat if any tabs left 8 months ago

From Jonathan Halmen to ~sircmpwn/visurf-devel

this would crash before if the last tab was closed.
---
supersedes the 'cmd_close: fallback to cmd_quit for last tab'

 frontends/visurf/window.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/frontends/visurf/window.c b/frontends/visurf/window.c
index 0c8809154..7ca7eda34 100644
--- a/frontends/visurf/window.c
+++ b/frontends/visurf/window.c
@@ -1394,7 +1394,9 @@ nsvi_window_key_event(struct nsvi_window *win,
		return;
	case NORMAL:
[message trimmed]

Re: [PATCH] cmd_close: fallback to cmd_quit for last tab 8 months ago

From Jonathan Halmen to ~sircmpwn/visurf-devel

> > I just found this in nsvi_gui_window_destroy(), which doesn't get
> > called though.

I was wrong. It does get called on a 'close', but then
nsvi_window_key_event calls browser_window_schedule_reformat
unconditionally anyway and crashes.

It does not get called on a 'quit'.

> Right. We should refactor this to be more robust instead of this
> approach.

I'm guessing just making sure that we actually still have a tab to call
browser_window_schedule_reformat on wouldn't be the refactoring you had

Re: [PATCH] cmd_close: fallback to cmd_quit for last tab 8 months ago

From Jonathan Halmen to ~sircmpwn/visurf-devel

> Why does this crash the browser?

nsvi_window_key_event() in NORMAL mode calls
  nsvi_bindings_handle() after which it calls
  browser_window_schedule_reformat() on the current tab->bw.

the first call will call cmd_close which in turn destroys and frees the
current tab's bw.

the schedule_reformat then crashes as the browser window doesn't exist
anymore.

> window.c should already handle this case and automatically set
> state.quit when the last window is closed.

[PATCH] cmd_close: fallback to cmd_quit for last tab 8 months ago

From Jonathan Halmen to ~sircmpwn/visurf-devel

closing the last tab crashes the browser
---
or should i just inline the quit command here, as it's just one line?

 frontends/visurf/commands.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/frontends/visurf/commands.c b/frontends/visurf/commands.c
index c88e7d314..275f82b46 100644
--- a/frontends/visurf/commands.c
+++ b/frontends/visurf/commands.c
@@ -85,7 +85,11 @@ cmd_close(struct nsvi_state *state, int argc, char *argv[])
		NSLOG(netsurf, ERROR, "close: no active window");
		return 1;
[message trimmed]

[PATCH v2] nsvi: add "source" command 8 months ago

From Jonathan Halmen to ~sircmpwn/visurf-devel

refactors config reading from nsvi_load_config into commands.c

also doesn't try to parse empty lines

[0]: https://todo.sr.ht/~sircmpwn/visurf/61
---
doesn't tackle the [-a] flag yet, think that should probably be done
after the unbind command exists.

regarding the further refactoring: is this along the lines of what you
had in mind?

 frontends/visurf/commands.c | 34 ++++++++++++++++++++++++++++++++++
 frontends/visurf/commands.h |  1 +
[message trimmed]

[PATCH] nsvi: add "source" command 8 months ago

From Jonathan Halmen to ~sircmpwn/visurf-devel

refactors config reading from nsvi_load_config into commands.c

also doesn't try to parse empty lines

[0]: https://todo.sr.ht/~sircmpwn/visurf/61
---
the nsvi_load_config now uses some weird free()s, would it be ok to use
gotos there?

also https://todo.sr.ht/~sircmpwn/visurf/22 mentions this command with
an [-a] flag, what should that do?

 frontends/visurf/commands.c | 28 ++++++++++++++++++++++++++++
 frontends/visurf/main.c     | 19 +++++++++----------
[message trimmed]

[PATCH] nsvi_command: check wordexp return value 8 months ago

From Jonathan Halmen to ~sircmpwn/visurf-devel

---
the following bsearch would crash if wordexp fails.
this happens if e.g. commands in the nsvirc like

bind "<XF86Back>" back

are improperly escaped.

 frontends/visurf/commands.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/frontends/visurf/commands.c b/frontends/visurf/commands.c
index 2f9273496..438c75f92 100644
--- a/frontends/visurf/commands.c
[message trimmed]