atlas-engineer / nyxt

Nyxt - the hacker's browser.
https://nyxt-browser.com/
9.64k stars 404 forks source link

Add ffi-buffer-reload function to foreign interface. #3329

Closed jmercouris closed 4 months ago

jmercouris commented 4 months ago

Description

Fixes #3325

Checklist:

aadcg commented 4 months ago

Thanks @jmercouris. I made a slight change to the changelog.

And so the wind blew with an unbeknownst coordinated grace. As if the mouths of all beings of the Earth were summoned to blow in unison.

In other words, it seems that we're roaming in a direction that actually matters.

aadcg commented 4 months ago

For completeness, a note follows.

Commit 83f12c0b63af282d03930a20435d127f7e9ef498 correctly acknowledged that relying on the renderer for reloads is a superior solution. However, it broke reopen-dead-buffer (as in the case of #3329). The aforementioned commit was eventually reverted (in fe825393db6f764ddfbd7a31c06e4880011b2832) to fix the reopen-dead-buffer bug.

What strategy is superior - 83f12c0b63af282d03930a20435d127f7e9ef498 or #3329? I'm convinced that the latter is superior. The renderer will always know best. In the extreme case that the renderer isn't able to reload, then ffi-buffer-reload can always fallback to ffi-buffer-load. Being explicit is better than fitting logic into one of the renderer's method specializations.

CC @jmercouris.