Repository: nushell/nushell (language: rust)

Issue:
`explore` prematurely exits on ESC rather than going back a level on `:try` and `:expand`
### Describe the bug

Pressing `ESC` completely exits `explore`, rather than going back/up a level on `:try` and `:expand`

### How to reproduce

1. ```nu
   [{a:1 b:2} {a:3 b:4}] | explore
   ```
2. Press `e` to enter `:expand` view
3. Press `ESC`

### Expected behavior

Exit the `:expand` view, not exit `explore` completely like pressing `Ctrl-D` does.

### Configuration

reproducible with `nu --no-config-file --plugins=[]`


Discussion / hints:
Someone who uses explore quite often, this bug has been driving me crazy for months. I think I managed to track down the root cause.

This [PR](https://github.com/nushell/nushell/pull/12692) changed the view's `is_light` field to `stackable` but did not update the logic when pushing to the view stack [here](https://github.com/nushell/nushell/pull/12692/files#diff-9c42b65206d8106836f49cb8e63de0051c476b51295ab798ea59a42206eb7e6cL477-R485) . I've removed negation here and it looks to be fixing the issue. Am I missing anything here or is this such a small fix? I can create a PR with the fix
@dam4rus thanks for investigating this 🙏
I tried your fix myself and it looks to be working. Go ahead with the PR 👍
And thanks again, this bug nearly made me stop using `explore`

Fix patch:
diff --git a/crates/nu-explore/src/pager/mod.rs b/crates/nu-explore/src/pager/mod.rs
index 2d4da2e1a7573..eb4ff5c4438e5 100644
--- a/crates/nu-explore/src/pager/mod.rs
+++ b/crates/nu-explore/src/pager/mod.rs
@@ -435,7 +435,7 @@ fn run_command(
 
             let new_view = cmd.spawn(engine_state, stack, value, &view_cfg)?;
             if let Some(view) = view_stack.curr_view.take() {
-                if !view.stackable {
+                if view.stackable {
                     view_stack.stack.push(view);
                 }
             }


Test patch: