porcupine icon indicating copy to clipboard operation
porcupine copied to clipboard

ctrl+shift+t

Open rdbende opened this issue 3 years ago • 1 comments

in a web browser if I accidentally close a tab, I can quickly reopen it with Ctrl+Shift+t, in Porcupine I can't :(

rdbende avatar Oct 06 '21 20:10 rdbende

We could use tab.get_state() to do this. See restart and poppingtabs plugins for examples.

For accidental closes, remembering one (or two, or three) most recently closed tab is probably enough. I don't like the idea of maintaining a list of states of closed tabs, because a list like that would grow and grow if you keep Porcupine opened for a long time, potentially consuming a lot of memory.

Akuli avatar Oct 06 '21 20:10 Akuli

We could remember the full state of a handful (configurable?) and then just remember the path (and maybe cursor position?) of a bunch more, I presume hundreds or thousands with no impact.

benjamin-kirkbride avatar Jul 02 '23 15:07 benjamin-kirkbride

50 at most, and maybe save it to disk?

rdbende avatar Jul 02 '23 16:07 rdbende

the path (and maybe cursor position?)

Tabs already have get_state() and from_state() methods that are meant to be used for exactly this. They are currently used in the restart plugin to restore previously opened tabs after restarting Porcupine.

Akuli avatar Jul 02 '23 16:07 Akuli