atuinsh/atuin

[Bug]: integer underflow when result list empty and pressing "up"

Closed this issue · 0 comments

What did you expect to happen?

No action.

What happened?

thread 'main' panicked at crates/atuin/src/command/client/search/interactive.rs:537:41:
attempt to subtract with overflow

self.results_state.select(i.min(self.results_len - 1));

Atuin doctor output

{
  "atuin": {
    "version": "18.4.0-beta.3",
    "sync": null,
    "sqlite_version": "3.46.0"
  },
  "shell": {
    "name": "zsh",
    "default": "zsh",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Darwin",
    "arch": "arm64",
    "version": "15.0",
    "disks": [
      {
        "name": "Macintosh HD",
        "filesystem": "apfs"
      },
      {
        "name": "Macintosh HD",
        "filesystem": "apfs"
      }
    ]
  }
}

Code of Conduct

  • I agree to follow this project's Code of Conduct